Skip to content

Commit

Permalink
docs: add back google analytic
Browse files Browse the repository at this point in the history
  • Loading branch information
EstrellaXD committed Nov 16, 2023
1 parent e350950 commit 550bb4e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
1 change: 0 additions & 1 deletion docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export default defineConfig({
['meta', {property: 'og:image', content: '/social.png'}],
['meta', {property: 'og:site_name', content: 'AutoBangumi'}],
['meta', {property: 'og:url', content: 'https://www.autobangumi.org'}],
["script", {src: '/_vercel/insights/script.js'}]
],

themeConfig: {
Expand Down
9 changes: 6 additions & 3 deletions docs/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import mediumZoom from 'medium-zoom'
import Documate from '@documate/vue'
import '@documate/vue/dist/style.css'
import HomePreviewWebUI from './components/HomePreviewWebUI.vue'
import googleAnalytics from 'vitepress-plugin-google-analytics'

import './style.css'

Expand Down Expand Up @@ -44,7 +45,9 @@ export default {
() => nextTick(initZoom),
)
},
enhanceApp({app, router, siteData}) {
// ...
}
enhanceApp: (ctx) => {
googleAnalytics({
id: 'G-3Z8W6WMN7J',
})
},
}
3 changes: 2 additions & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
},
"type": "module",
"dependencies": {
"@documate/vue": "^0.3.1"
"@documate/vue": "^0.3.1",
"vitepress-plugin-google-analytics": "^1.0.2"
}
}
7 changes: 7 additions & 0 deletions docs/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 550bb4e

Please sign in to comment.