Skip to content

Commit a78a91f

Browse files
committed
dcos: migration guide
1 parent 3771f59 commit a78a91f

File tree

2 files changed

+98
-5
lines changed

2 files changed

+98
-5
lines changed

packages/docs/docs/miscellaneous/migration-guide.md

+68-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,71 @@ sidebar: auto
44

55
# Migration from 0.x
66

7-
- TODO
7+
## Site Config
8+
9+
### ga <Badge text="replaced"/>
10+
11+
GA has been separated into a standalone plugin [@vuepress/google-analytics](../plugin/official/plugin-google-analytics.md).
12+
13+
::: upgrade
14+
15+
1. Install `@vuepress/google-analytics`:
16+
17+
```bash
18+
yarn add @vuepress/google-analytics -D
19+
```
20+
21+
2. Update `vuepress/config.js`:
22+
23+
```diff
24+
module.exports = {
25+
- markdown: {
26+
- config(md) { /* ... */ }
27+
- },
28+
+ extendMarkdown(md) { /* ... */ }
29+
}
30+
```
31+
:::
32+
33+
### markdown.config <Badge text="renamed"/>
34+
35+
Using `extendMarkdown`:。
36+
37+
::: upgrade
38+
Update `vuepress/config.js`:
39+
```diff
40+
// vuepress/config.js
41+
module.exports = {
42+
- markdown: {
43+
- config(md) { /* ... */ }
44+
- },
45+
+ extendMarkdown(md) { /* ... */ }
46+
}
47+
```
48+
:::
49+
50+
### serviceWorker <Badge text="replaced"/>
51+
52+
Service Worker related features have been separated into a standalone plugin [@vuepress/plugin-pwa](../plugin/official/plugin-pwa.md).
53+
54+
::: upgrade
55+
See: [@vuepress/plugin-pwa > Migration from 0.x](../plugin/official/plugin-pwa.md#migration-from-0-x)
56+
:::
57+
58+
## Default Theme Config
59+
60+
### `.vuepress/override.styl` <Badge text="replaced"/>
61+
62+
Replaced by `.vuepress/styles/palette.styl`.
63+
64+
::: upgrade
65+
See: [Config > palette.styl](../config/README.md#palette-styl)
66+
:::
67+
68+
### `.vuepress/style.styl` <Badge text="replaced"/>
69+
70+
Replaced by `.vuepress/styles/index.styl` 代替.
71+
72+
::: upgrade
73+
See: [Config > index.styl](../config/README.md#index-styl)
74+
:::

packages/docs/docs/zh/miscellaneous/migration-guide.md

+30-4
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ sidebar: auto
44

55
# 从 VuePress 0.x 迁移
66

7-
## config.js
7+
## 站点配置
88

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

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

1313
::: upgrade
1414

@@ -30,9 +30,9 @@ module.exports = {
3030
```
3131
:::
3232

33-
### markdown.config <Badge text="替换"/>
33+
### markdown.config <Badge text="重命名"/>
3434

35-
使用 `extendMarkdown` 代替。
35+
使用 `extendMarkdown`
3636

3737
::: upgrade
3838
Update `vuepress/config.js`:
@@ -46,3 +46,29 @@ module.exports = {
4646
}
4747
```
4848
:::
49+
50+
### serviceWorker <Badge text="替换"/>
51+
52+
Service Worker 相关的功能已经被分离为一个单独的插件 [@vuepress/plugin-pwa](../plugin/official/plugin-pwa.md)
53+
54+
::: upgrade
55+
参考: [@vuepress/plugin-pwa > 从 0.x 迁移](../plugin/official/plugin-pwa.md#从-0-x-迁移)
56+
:::
57+
58+
## 默认主题配置
59+
60+
### `.vuepress/override.styl` <Badge text="替换"/>
61+
62+
使用 `.vuepress/styles/palette.styl` 代替。
63+
64+
::: upgrade
65+
参考: [Config > palette.styl](../config/README.md#palette-styl)
66+
:::
67+
68+
### `.vuepress/style.styl` <Badge text="替换"/>
69+
70+
使用 `.vuepress/styles/index.styl` 代替。
71+
72+
::: upgrade
73+
参考: [Config > index.styl](../config/README.md#index-styl)
74+
:::

0 commit comments

Comments
 (0)