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

@ -5,9 +5,9 @@
* LICENSE file in the root directory of this source tree.
*/
export interface ThemeConfig {
googleAnalytics?: {
trackingID: string;
anonymizeIP?: boolean;
};
}
export type PluginOptions = {
trackingID: string;
anonymizeIP: boolean;
};
export type Options = Partial<PluginOptions>;