File tree 1 file changed +9
-7
lines changed
packages/docs/docs/zh/miscellaneous
1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -8,24 +8,26 @@ sidebar: auto
8
8
9
9
### ga <Badge text =" 替换 " />
10
10
11
- GA 已经被分离为一个单独的插件 [ @vuepress/google-analytics ] ( ../plugin/official/plugin-google-analytics.md ) 。
11
+ GA 已经被分离为一个单独的插件 [ @vuepress/plugin- google-analytics ] ( ../plugin/official/plugin-google-analytics.md ) 。
12
12
13
13
::: upgrade
14
14
15
- 1 . Install ` @vuepress/google-analytics ` :
15
+ 1 . Install ` @vuepress/plugin- google-analytics ` :
16
16
17
17
``` bash
18
- yarn add @vuepress/google-analytics -D
18
+ yarn add -D @vuepress/plugin- google-analytics
19
19
```
20
20
21
21
2 . Update ` vuepress/config.js ` :
22
22
23
23
``` diff
24
24
module.exports = {
25
- - markdown: {
26
- - config(md) { /* ... */ }
27
- - },
28
- + extendMarkdown(md) { /* ... */ }
25
+ - ga: 'UA-12345678-9'
26
+ },
27
+ plugins: {
28
+ + '@vuepress/google-analytics': {
29
+ + ga: 'UA-12345678-9'
30
+ + }
29
31
}
30
32
```
31
33
:::
You can’t perform that action at this time.
0 commit comments