docs(v2): fix outdated/ wrong info

This commit is contained in:
endiliey 2019-10-05 15:39:22 +07:00
parent d5ca17ffea
commit 7d5920b30c
3 changed files with 14 additions and 26 deletions

View file

@ -64,7 +64,7 @@ module.exports = {
## Passing options to Docusaurus plugins via preset
If you initialized your site using the classic template, you do not have to specify plugin options individually in your `docusaurus.config.js`. To provide the neccesary fields to certain plugins, i.e. `trackingID` for `@docusaurus/plugin-google-analytics`, pass them in the preset field, like this:
If you initialized your site using the classic template, you do not have to specify plugin options individually in your `docusaurus.config.js`. To provide the neccesary fields to certain plugins, i.e. `customCss` for `@docusaurus/theme-classic`, pass them in the preset field, like this:
```js
// docusaurus.config.js
@ -73,18 +73,10 @@ module.exports = {
[
'@docusaurus/preset-classic',
{
// Will be passed to @docusaurus/plugin-content-docs.
docs: {
sidebarPath: require.resolve('./sidebars.js'),
},
// Will be passed to @docusaurus/theme-classic.
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
// Will be passed to @docusaurus/plugin-google-analytics.
googleAnalytics: {
trackingID: 'UA-1428571428-5',
},
...
},
],