docs: improve migrating from vuepress guide

pull/164/head
Matias Capeletto 5 years ago
parent 38b79cb551
commit 9a3cacd191

@ -1,6 +1,6 @@
# Migrating from VuePress # Migrating from VuePress
VitePress follows VuePress config and default theme API where possible to ease the migration path. There are although some features that are not present in vitepress because of differences in the [design goals](../index.md) of the two projects. VitePress aims to have bare minimal features for authoring docs and most features are pushed to the Themes, where else VuePress has those features enabled by plugins. VitePress follows VuePress config and default theme API where possible to ease the migration path. However, there are some features that are not present in VitePress because of differences in the [design goals](../index.md) of the two projects. VitePress aims to have bare minimal features for authoring docs and most features are pushed to the Themes, whereas VuePress has those features enabled by plugins.
This is a list of changes and removed features compared to [VuePress v1.7.1](https://github.com/vuejs/vuepress/releases/tag/v1.7.1) This is a list of changes and removed features compared to [VuePress v1.7.1](https://github.com/vuejs/vuepress/releases/tag/v1.7.1)
@ -14,92 +14,104 @@ Some of these differences may be gone before Vitepress 1.0 is released.
## General ## General
- Removed
- YAML and TOML are not supported formats for site config. Only javascript is supported for `.vitepress/config.js` - YAML and TOML are not supported formats for site config. Only javascript is supported for `.vitepress/config.js`
- removed [Plugins](https://vuepress.vuejs.org/plugin/) support, features are implemented in themes - [Plugins](https://vuepress.vuejs.org/plugin/) support, features are implemented in themes
- removed [permalink support](https://vuepress.vuejs.org/guide/permalinks.html) - [permalink support](https://vuepress.vuejs.org/guide/permalinks.html)
- `.vitepress/templates`
- Components in `.vitepress/components` [are not auto registered as global components](https://vuepress.vuejs.org/) - Components in `.vitepress/components` [are not auto registered as global components](https://vuepress.vuejs.org/)
- Changed
- [Public files](https://vuepress.vuejs.org/guide/assets.html#public-files) that are directly copied to dist root moved from `.vitepress/public/` to `public/` - [Public files](https://vuepress.vuejs.org/guide/assets.html#public-files) that are directly copied to dist root moved from `.vitepress/public/` to `public/`
- Changed [App Level Enhancements](https://vuepress.vuejs.org/guide/basic-config.html#app-level-enhancements) API, app enhancements moved from `.vitepress/enhanceApp.js` to `.vitepress/theme/index.js`. - [styling](https://vuepress.vuejs.org/config/#styling) `.vitepress/styles/index.styl` and `.vitepress/styles/palette.styl` changed to `.vitepress/style.styl`
- removed [styling](https://vuepress.vuejs.org/config/#styling) `.vitepress/styles/index.styl` and `.vitepress/styles/palette.styl`. - [App Level Enhancements](https://vuepress.vuejs.org/guide/basic-config.html#app-level-enhancements) API, app enhancements moved from `.vitepress/enhanceApp.js` to `.vitepress/theme/index.js`.
- removed `.vitepress/templates`
## Markdown ## Markdown
- removed support for [toml in frontmatter](https://vuepress.vuejs.org/guide/frontmatter.html#alternative-frontmatter-formats) - Removed
- removed [details block](https://vuepress.vuejs.org/guide/markdown.html#custom-containers) - Support for [toml in frontmatter](https://vuepress.vuejs.org/guide/frontmatter.html#alternative-frontmatter-formats)
- removed [markdown slots](https://vuepress.vuejs.org/guide/markdown-slot.html) - [details block](https://vuepress.vuejs.org/guide/markdown.html#custom-containers)
- [markdown slots](https://vuepress.vuejs.org/guide/markdown-slot.html)
guide/using-vue.html#using-components). guide/using-vue.html#using-components).
- removed `~` prefix to explicitly specify a url is a [webpack module request](https://vuepress.vuejs.org/guide/assets.html#relative-urls) - `~` prefix to explicitly specify a url is a [webpack module request](https://vuepress.vuejs.org/guide/assets.html#relative-urls)
## Site Config ## Site Config
- renamed `temp` to `tempDir` - Removed
- renamed `dest` to `outDir` - `temp`
- removed [`theme` from a dependency](https://vuepress.vuejs.org/theme/using-a-theme.html#using-a-theme-from-a-dependency) - `dest`
- removed `permalink` - [`theme` from a dependency](https://vuepress.vuejs.org/theme/using-a-theme.html#using-a-theme-from-a-dependency)
- removed [`port`](https://vuepress.vuejs.org/config/#port) - `permalink`
- removed [`shouldPrefetch`](https://vuepress.vuejs.org/config/#shouldprefetch) - [`port`](https://vuepress.vuejs.org/config/#port)
- removed [`cache`](https://vuepress.vuejs.org/config/#cache) - [`shouldPrefetch`](https://vuepress.vuejs.org/config/#shouldprefetch)
- removed [`extraWatchFiles`](https://vuepress.vuejs.org/config/#extrawatchfiles) - [`cache`](https://vuepress.vuejs.org/config/#cache)
- removed [`patterns`](https://vuepress.vuejs.org/config/#patterns) - [`extraWatchFiles`](https://vuepress.vuejs.org/config/#extrawatchfiles)
- removed [`plugins`](https://vuepress.vuejs.org/config/#pluggable) - [`patterns`](https://vuepress.vuejs.org/config/#patterns)
- removed [`markdown.pageSuffix`](https://vuepress.vuejs.org/config/#markdown-pagesuffix) - [`plugins`](https://vuepress.vuejs.org/config/#pluggable)
- removed [`markdown.slugify`](https://vuepress.vuejs.org/config/#markdown-slugify) - [`markdown.pageSuffix`](https://vuepress.vuejs.org/config/#markdown-pagesuffix)
- removed [`markdown.plugins`](https://vuepress.vuejs.org/config/#markdown-plugins) - [`markdown.slugify`](https://vuepress.vuejs.org/config/#markdown-slugify)
- removed [`markdown.extractHeaders`](https://vuepress.vuejs.org/config/#markdown-extractheaders) - [`markdown.plugins`](https://vuepress.vuejs.org/config/#markdown-plugins)
- renamed `markdown.extendMarkdown` to `markdown.config` - [`markdown.extractHeaders`](https://vuepress.vuejs.org/config/#markdown-extractheaders)
- removed `configureWebpack`, `chainWebpack`, `postcss`, `Stylus`, `scss`, `Sass`, `less` configs - `markdown.extendMarkdown` to `markdown.config`
- removed [`evergreen`](https://vuepress.vuejs.org/config/#evergreen) - `configureWebpack`, `chainWebpack`, `postcss`, `Stylus`, `scss`, `Sass`, `less` configs
- [`evergreen`](https://vuepress.vuejs.org/config/#evergreen)
## Default Theme Config ## Default Theme Config
- removed [`smoothScroll`](https://vuepress.vuejs.org/theme/default-theme-config.html#smooth-scrolling) - Removed
- removed [`displayAllHeaders`](https://vuepress.vuejs.org/theme/default-theme-config.html#displaying-header-links-of-all-pages) - [`smoothScroll`](https://vuepress.vuejs.org/theme/default-theme-config.html#smooth-scrolling)
- removed [`activeHeaderLinks`](https://vuepress.vuejs.org/theme/default-theme-config.html#active-header-links) - [`displayAllHeaders`](https://vuepress.vuejs.org/theme/default-theme-config.html#displaying-header-links-of-all-pages)
- removed `sidebarDepth` and `initialOpenGroupIndex` for [sidebar groups](https://vuepress.vuejs.org/theme/default-theme-config.html#sidebar-groups) - [`activeHeaderLinks`](https://vuepress.vuejs.org/theme/default-theme-config.html#active-header-links)
- renamed `searchMaxSuggestions` to `search.maxSuggestions` - `sidebarDepth` and `initialOpenGroupIndex` for [sidebar groups](https://vuepress.vuejs.org/theme/default-theme-config.html#sidebar-groups)
- renamed `algolia` to `search.algolia` - Renamed
- renamed `searchPlaceholder` to `search.placeholder` - `searchMaxSuggestions` to `search.maxSuggestions`
- `algolia` to `search.algolia`
- `searchPlaceholder` to `search.placeholder`
# Default Theme # Default Theme
- removed [`<code-group>` and `<code-block>`](https://vuepress.vuejs.org/theme/default-theme-config.html#code-groups-and-code-blocks) - Removed
- [`<code-group>` and `<code-block>`](https://vuepress.vuejs.org/theme/default-theme-config.html#code-groups-and-code-blocks)
## Computed Globals ## Computed Globals
- removed `$lang` - Removed
- removed `$localePath` - `$lang`
- `$localePath`
## Frontmatter Predefined Variables ## Frontmatter Predefined Variables
- removed `description` - Removed
- removed `meta` - `description`
- removed `lang` - [`meta`](https://vuepress.vuejs.org/guide/frontmatter.html#meta)
- removed [`layout`](https://vuepress.vuejs.org/guide/frontmatter.html#layout) - [`metaTitle`](https://vuepress.vuejs.org/guide/frontmatter.html#predefined-variables)
- removed [`permalink`](https://vuepress.vuejs.org/guide/frontmatter.html#predefined-variables) - `lang`
- removed [`canonicalUrl`](https://vuepress.vuejs.org/guide/frontmatter.html#predefined-variables) - [`layout`](https://vuepress.vuejs.org/guide/frontmatter.html#layout)
- removed [`metaTitle`](https://vuepress.vuejs.org/guide/frontmatter.html#predefined-variables) - [`permalink`](https://vuepress.vuejs.org/guide/frontmatter.html#predefined-variables)
- removed [`meta`](https://vuepress.vuejs.org/guide/frontmatter.html#meta) - [`canonicalUrl`](https://vuepress.vuejs.org/guide/frontmatter.html#predefined-variables)
## Frontmatter Default Theme Variables ## Frontmatter Default Theme Variables
- removed `prev`, `next`, - Removed
- removed [`search`](https://vuepress.vuejs.org/guide/frontmatter.html#search) - `prev`, `next`
- removed [`tags`](https://vuepress.vuejs.org/guide/frontmatter.html#tags) - [`search`](https://vuepress.vuejs.org/guide/frontmatter.html#search)
- removed [`pageClass`](https://vuepress.vuejs.org/theme/default-theme-config.html#custom-page-class) - [`tags`](https://vuepress.vuejs.org/guide/frontmatter.html#tags)
- removed [`layout`](https://vuepress.vuejs.org/theme/default-theme-config.html#custom-layout-for-specific-pages) - [`pageClass`](https://vuepress.vuejs.org/theme/default-theme-config.html#custom-page-class)
- [`layout`](https://vuepress.vuejs.org/theme/default-theme-config.html#custom-layout-for-specific-pages)
## siteData ## siteData
- removed [`pages`](https://vuepress.vuejs.org/theme/writing-a-theme.html#site-and-page-metadata) - Removed
- [`pages`](https://vuepress.vuejs.org/theme/writing-a-theme.html#site-and-page-metadata)
## pageData ## pageData
- removed `key` - Removed
- removed `path` - `key`
- removed `regularPath` - `path`
- `regularPath`
## Default Components ## Default Components
- removed [`<ClientOnly>`](https://vuepress.vuejs.org/guide/using-vue.html#browser-api-access-restrictions) - Removed
- removed [`<Badge>`](https://vuepress.vuejs.org/guide/using-vue.html#badge) - [`<ClientOnly>`](https://vuepress.vuejs.org/guide/using-vue.html#browser-api-access-restrictions)
- [`<Badge>`](https://vuepress.vuejs.org/guide/using-vue.html#badge)

Loading…
Cancel
Save