refactor(ganalytics, gtag): move options out of themeConfig (#5832)

* refactor(ganalytics, gtag): move options out of themeConfig

* Forbid themeConfig options

* Add PR link

* Add key names to error message

* Fix?

* Doc updates

Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
This commit is contained in:
Joshua Chen 2021-11-10 19:04:43 +08:00 committed by GitHub
parent f5732e7589
commit ac88d979f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 274 additions and 106 deletions

View file

@ -301,6 +301,11 @@ const config = {
theme: {
customCss: [require.resolve('./src/css/custom.css')],
},
gtag: !isDeployPreview
? {
trackingID: 'UA-141789564-1',
}
: undefined,
}),
],
],
@ -328,11 +333,6 @@ const config = {
},
image: 'img/docusaurus-soc.png',
// metadata: [{name: 'twitter:card', content: 'summary'}],
gtag: !isDeployPreview
? {
trackingID: 'UA-141789564-1',
}
: undefined,
algolia: {
appId: 'X1Z85QJPUV',
apiKey: 'bf7211c161e8205da2f933a02534105a',