mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-04 09:19:16 +02:00
feat(v2): ability to add/override theme html metadatas (#3406)
* ability to add/override theme html metadatas see https://github.com/facebook/docusaurus/issues/3024 * refactor/fix validateThemeConfig tests
This commit is contained in:
parent
f49d8baf2f
commit
21852948ce
5 changed files with 72 additions and 29 deletions
|
@ -85,6 +85,20 @@ module.exports = {
|
|||
};
|
||||
```
|
||||
|
||||
### Metadatas
|
||||
|
||||
You can configure additional html metadatas (and override existing ones).
|
||||
|
||||
```js {4-6} title="docusaurus.config.js"
|
||||
module.exports = {
|
||||
// ...
|
||||
themeConfig: {
|
||||
metadatas: [{name: 'twitter:card', content: 'summary'}],
|
||||
// ...
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
### Announcement bar
|
||||
|
||||
Sometimes you want to announce something in your website. Just for such a case, you can add an announcement bar. This is a non-fixed and optionally dismissable panel above the navbar.
|
||||
|
|
|
@ -228,6 +228,7 @@ module.exports = {
|
|||
darkTheme: require('prism-react-renderer/themes/dracula'),
|
||||
},
|
||||
image: 'img/docusaurus-soc.png',
|
||||
// metadatas: [{name: 'twitter:card', content: 'summary'}],
|
||||
gtag: {
|
||||
trackingID: 'UA-141789564-1',
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue