Skip to content

Commit

Permalink
dcos: migration guide
Browse files Browse the repository at this point in the history
  • Loading branch information
ulivz committed Nov 4, 2018
1 parent 3771f59 commit a78a91f
Show file tree
Hide file tree
Showing 2 changed files with 98 additions and 5 deletions.
69 changes: 68 additions & 1 deletion packages/docs/docs/miscellaneous/migration-guide.md
Expand Up @@ -4,4 +4,71 @@ sidebar: auto

# Migration from 0.x

- TODO
## Site Config

### ga <Badge text="replaced"/>

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 <Badge text="renamed"/>

Using `extendMarkdown`:。

::: upgrade
Update `vuepress/config.js`:
```diff
// vuepress/config.js
module.exports = {
- markdown: {
- config(md) { /* ... */ }
- },
+ extendMarkdown(md) { /* ... */ }
}
```
:::

### serviceWorker <Badge text="replaced"/>

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` <Badge text="replaced"/>

Replaced by `.vuepress/styles/palette.styl`.

::: upgrade
See: [Config > palette.styl](../config/README.md#palette-styl)
:::

### `.vuepress/style.styl` <Badge text="replaced"/>

Replaced by `.vuepress/styles/index.styl` 代替.

::: upgrade
See: [Config > index.styl](../config/README.md#index-styl)
:::
34 changes: 30 additions & 4 deletions packages/docs/docs/zh/miscellaneous/migration-guide.md
Expand Up @@ -4,11 +4,11 @@ sidebar: auto

# 从 VuePress 0.x 迁移

## config.js
## 站点配置

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

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

::: upgrade

Expand All @@ -30,9 +30,9 @@ module.exports = {
```
:::

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

使用 `extendMarkdown` 代替。
使用 `extendMarkdown`

::: upgrade
Update `vuepress/config.js`:
Expand All @@ -46,3 +46,29 @@ module.exports = {
}
```
:::

### serviceWorker <Badge text="替换"/>

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` <Badge text="替换"/>

使用 `.vuepress/styles/palette.styl` 代替。

::: upgrade
参考: [Config > palette.styl](../config/README.md#palette-styl)
:::

### `.vuepress/style.styl` <Badge text="替换"/>

使用 `.vuepress/styles/index.styl` 代替。

::: upgrade
参考: [Config > index.styl](../config/README.md#index-styl)
:::

0 comments on commit a78a91f

Please sign in to comment.