|
1 |
| -import { viteBundler } from "@vuepress/bundler-vite"; |
2 |
| -import { defineUserConfig } from "vuepress"; |
| 1 | +import {viteBundler} from "@vuepress/bundler-vite"; |
| 2 | +import {defineUserConfig} from "vuepress"; |
3 | 3 | import theme from "./theme.js";
|
4 | 4 |
|
5 | 5 | export default defineUserConfig({
|
6 |
| - base: "/", |
7 |
| - lang: "zh-CN", |
8 |
| - title: "Golang 中文学习文档", |
9 |
| - description: "Go 爱好者驱动的中文学习文档", |
| 6 | + base: "/", |
| 7 | + lang: "zh-CN", |
| 8 | + title: "Golang 中文学习文档", |
| 9 | + description: "Go 爱好者驱动的中文学习文档", |
10 | 10 |
|
11 |
| - head: [ |
12 |
| - [ |
13 |
| - "script", |
14 |
| - {}, |
15 |
| - `var _hmt = _hmt || []; |
| 11 | + head: [ |
| 12 | + [ |
| 13 | + "script", |
| 14 | + {}, |
| 15 | + `var _hmt = _hmt || []; |
16 | 16 | (function() {
|
17 | 17 | var hm = document.createElement("script");
|
18 | 18 | hm.src = "https://hm.baidu.com/hm.js?87d678935e4b33455c0390543e7a759d";
|
19 | 19 | var s = document.getElementsByTagName("script")[0];
|
20 | 20 | s.parentNode.insertBefore(hm, s);
|
21 | 21 | })();`,
|
| 22 | + ], |
| 23 | + [ |
| 24 | + "script", |
| 25 | + { |
| 26 | + async: true, |
| 27 | + src: "https://www.googletagmanager.com/gtag/js?id=G-6K9H75LPZG" |
| 28 | + } |
| 29 | + ], |
| 30 | + [ |
| 31 | + "script", |
| 32 | + {}, |
| 33 | + `window.dataLayer = window.dataLayer || []; |
| 34 | + function gtag(){dataLayer.push(arguments);} |
| 35 | + gtag('js', new Date()); |
| 36 | +
|
| 37 | + gtag('config', 'G-6K9H75LPZG');` |
| 38 | + ], |
22 | 39 | ],
|
23 |
| - ], |
24 | 40 |
|
25 |
| - bundler: viteBundler(), |
26 |
| - theme, |
| 41 | + bundler: viteBundler(), |
| 42 | + theme, |
27 | 43 |
|
28 |
| - shouldPrefetch: false, |
29 |
| - pagePatterns: ["**/*.md", "!**/*.snippet.md", "!.vuepress", "!node_modules"], |
| 44 | + shouldPrefetch: false, |
| 45 | + pagePatterns: ["**/*.md", "!**/*.snippet.md", "!.vuepress", "!node_modules"], |
30 | 46 | });
|
0 commit comments