从 VuePress 0.x 迁移
站点配置
替换
gaGA 已经被分离为一个单独的插件 @vuepress/plugin-google-analytics。
Upgrade Path
- Install
@vuepress/plugin-google-analytics
:
yarn add -D @vuepress/plugin-google-analytics
- Update
vuepress/config.js
:
module.exports = {
- ga: 'UA-12345678-9'
},
plugins: {
+ '@vuepress/google-analytics': {
+ ga: 'UA-12345678-9'
+ }
}
重命名
markdown.config使用 extendMarkdown
:
Upgrade Path
Update vuepress/config.js
:
// vuepress/config.js
module.exports = {
- markdown: {
- config(md) { /* ... */ }
- },
+ extendMarkdown(md) { /* ... */ }
}
替换
serviceWorkerService Worker 相关的功能已经被分离为一个单独的插件 @vuepress/plugin-pwa。
Upgrade Path
默认主题配置
.vuepress/override.styl
替换
使用 .vuepress/styles/palette.styl
代替。
Upgrade Path
.vuepress/style.styl
替换
使用 .vuepress/styles/index.styl
代替。