From 52d6baae2ae681fca4aef193e3937d14ced72937 Mon Sep 17 00:00:00 2001 From: ycx Date: Mon, 15 Jul 2024 11:26:07 +0800 Subject: [PATCH] Fix Error --- src/.vuepress/config.js | 8 ++++++++ src/.vuepress/modules/theme.js | 4 ---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/.vuepress/config.js b/src/.vuepress/config.js index 484a52f0..45b24931 100644 --- a/src/.vuepress/config.js +++ b/src/.vuepress/config.js @@ -1,5 +1,7 @@ // import { searchProPlugin } from "vuepress-plugin-search-pro"; // import { cut } from "nodejs-jieba"; +import { googleAnalyticsPlugin } from '@vuepress/plugin-google-analytics'; + import theme from "./modules/theme.js"; export default { @@ -36,6 +38,12 @@ export default { theme, + plugins: [ + googleAnalyticsPlugin({ + id: "G-GWSWLL4D2C" + }) + ], + /* configureWebpack: () => { const NODE_ENV = process.env.NODE_ENV if (NODE_ENV === 'production') { diff --git a/src/.vuepress/modules/theme.js b/src/.vuepress/modules/theme.js index cd6e6980..67407bca 100644 --- a/src/.vuepress/modules/theme.js +++ b/src/.vuepress/modules/theme.js @@ -86,10 +86,6 @@ export default hopeTheme({ ] }, - googleAnalyticsPlugin({ - id: "G-GWSWLL4D2C", - }), - /* searchPro: { indexContent: true,