Skip to content

Commit 330e9c2

Browse files
Euler Chenulivz
Euler Chen
authored andcommitted
docs: fix for Google Analytics instructions in Chinese version (#1144)
1 parent fd09bad commit 330e9c2

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

Diff for: packages/docs/docs/zh/miscellaneous/migration-guide.md

+9-7
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,26 @@ sidebar: auto
88

99
### ga <Badge text="替换"/>
1010

11-
GA 已经被分离为一个单独的插件 [@vuepress/google-analytics](../plugin/official/plugin-google-analytics.md)
11+
GA 已经被分离为一个单独的插件 [@vuepress/plugin-google-analytics](../plugin/official/plugin-google-analytics.md)
1212

1313
::: upgrade
1414

15-
1. Install `@vuepress/google-analytics`:
15+
1. Install `@vuepress/plugin-google-analytics`:
1616

1717
```bash
18-
yarn add @vuepress/google-analytics -D
18+
yarn add -D @vuepress/plugin-google-analytics
1919
```
2020

2121
2. Update `vuepress/config.js`:
2222

2323
```diff
2424
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+
+ }
2931
}
3032
```
3133
:::

0 commit comments

Comments
 (0)