From a78a91f461486ba130ae9570d53dbe564faa1b52 Mon Sep 17 00:00:00 2001
From: ULIVZ <472590061@qq.com>
Date: Mon, 5 Nov 2018 01:31:34 +0800
Subject: [PATCH] dcos: migration guide
---
.../docs/miscellaneous/migration-guide.md | 69 ++++++++++++++++++-
.../docs/zh/miscellaneous/migration-guide.md | 34 +++++++--
2 files changed, 98 insertions(+), 5 deletions(-)
diff --git a/packages/docs/docs/miscellaneous/migration-guide.md b/packages/docs/docs/miscellaneous/migration-guide.md
index 785bbbb118..3997ee6531 100644
--- a/packages/docs/docs/miscellaneous/migration-guide.md
+++ b/packages/docs/docs/miscellaneous/migration-guide.md
@@ -4,4 +4,71 @@ sidebar: auto
# Migration from 0.x
-- TODO
+## Site Config
+
+### ga
+
+GA has been separated into a standalone plugin [@vuepress/google-analytics](../plugin/official/plugin-google-analytics.md).
+
+::: upgrade
+
+1. Install `@vuepress/google-analytics`:
+
+```bash
+yarn add @vuepress/google-analytics -D
+```
+
+2. Update `vuepress/config.js`:
+
+```diff
+module.exports = {
+- markdown: {
+- config(md) { /* ... */ }
+- },
++ extendMarkdown(md) { /* ... */ }
+}
+```
+:::
+
+### markdown.config
+
+Using `extendMarkdown`:。
+
+::: upgrade
+Update `vuepress/config.js`:
+```diff
+// vuepress/config.js
+module.exports = {
+- markdown: {
+- config(md) { /* ... */ }
+- },
++ extendMarkdown(md) { /* ... */ }
+}
+```
+:::
+
+### serviceWorker
+
+Service Worker related features have been separated into a standalone plugin [@vuepress/plugin-pwa](../plugin/official/plugin-pwa.md).
+
+::: upgrade
+See: [@vuepress/plugin-pwa > Migration from 0.x](../plugin/official/plugin-pwa.md#migration-from-0-x)
+:::
+
+## Default Theme Config
+
+### `.vuepress/override.styl`
+
+Replaced by `.vuepress/styles/palette.styl`.
+
+::: upgrade
+See: [Config > palette.styl](../config/README.md#palette-styl)
+:::
+
+### `.vuepress/style.styl`
+
+Replaced by `.vuepress/styles/index.styl` 代替.
+
+::: upgrade
+See: [Config > index.styl](../config/README.md#index-styl)
+:::
diff --git a/packages/docs/docs/zh/miscellaneous/migration-guide.md b/packages/docs/docs/zh/miscellaneous/migration-guide.md
index b358aca254..2720690135 100644
--- a/packages/docs/docs/zh/miscellaneous/migration-guide.md
+++ b/packages/docs/docs/zh/miscellaneous/migration-guide.md
@@ -4,11 +4,11 @@ sidebar: auto
# 从 VuePress 0.x 迁移
-## config.js
+## 站点配置
### ga
-使用 [@vuepress/google-analytics](../plugin/official.md#vuepress-google-analytics) 代替。
+GA 已经被分离为一个单独的插件 [@vuepress/google-analytics](../plugin/official/plugin-google-analytics.md)。
::: upgrade
@@ -30,9 +30,9 @@ module.exports = {
```
:::
-### markdown.config
+### markdown.config
-使用 `extendMarkdown` 代替。
+使用 `extendMarkdown`:
::: upgrade
Update `vuepress/config.js`:
@@ -46,3 +46,29 @@ module.exports = {
}
```
:::
+
+### serviceWorker
+
+Service Worker 相关的功能已经被分离为一个单独的插件 [@vuepress/plugin-pwa](../plugin/official/plugin-pwa.md)。
+
+::: upgrade
+参考: [@vuepress/plugin-pwa > 从 0.x 迁移](../plugin/official/plugin-pwa.md#从-0-x-迁移)
+:::
+
+## 默认主题配置
+
+### `.vuepress/override.styl`
+
+使用 `.vuepress/styles/palette.styl` 代替。
+
+::: upgrade
+参考: [Config > palette.styl](../config/README.md#palette-styl)
+:::
+
+### `.vuepress/style.styl`
+
+使用 `.vuepress/styles/index.styl` 代替。
+
+::: upgrade
+参考: [Config > index.styl](../config/README.md#index-styl)
+:::