diff --git a/website/docs/advanced-plugins.md b/website/docs/advanced-plugins.md index b80fb05222..a7e1ab1c97 100644 --- a/website/docs/advanced-plugins.md +++ b/website/docs/advanced-plugins.md @@ -177,14 +177,12 @@ $ yarn add @docusaurus/plugin-google-analytics ```js // docusaurus.config.js module.exports = { - plugins: [ - [ - '@docusaurus/plugin-google-analytics', - { - trackingID: 'UA-142857148-5', - }, - ], - ], + plugins: ['@docusaurus/plugin-google-analytics'], + themeConfig: { + googleAnalytics: { + trackingID: 'UA-141789564-1', + }, + } }; ``` @@ -203,14 +201,12 @@ $ yarn add @docusaurus/plugin-google-gtag ```js // docusaurus.config.js module.exports = { - plugins: [ - [ - '@docusaurus/plugin-google-gtag', - { - trackingID: 'UA-142857148-5', - }, - ], - ], + plugins: ['@docusaurus/plugin-google-gtag'], + themeConfig: { + gtag: { + trackingID: 'UA-141789564-1', + }, + } }; ``` diff --git a/website/docs/using-plugins.md b/website/docs/using-plugins.md index 5ede6fced4..95aa466cec 100644 --- a/website/docs/using-plugins.md +++ b/website/docs/using-plugins.md @@ -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', - }, ... }, ], diff --git a/website/docs/using-themes.md b/website/docs/using-themes.md index 4640e578e0..760d39cc78 100644 --- a/website/docs/using-themes.md +++ b/website/docs/using-themes.md @@ -34,7 +34,7 @@ As an example, to swizzle the `