与 VuePress 的区别
VitePress 和 VuePress 有不同的设计目标. 这两个项目共享相似的配置命名约定. VitePress 的目标是为编写文档提供最基本的功能. 其他特性被推到主题中. 另一方面, VuePress 拥有更多的开箱即用的特性, 或者由它的插件生态系统支持的特性.
TIP
如果您使用的是 VuePress, 则无需迁移到 VitePress. 在可预见的未来, 这两个项目将继续共存.
WARNING
请注意, 这是早期 WIP! 目前的重点是首先使 Vite 稳定和功能齐全. 目前还不建议将其用于任何重要场景.
如果您决定将您的项目移到 VitePress, 以下是您需要考虑的与VuePress v1.7.1的不同之处.
General
- Missing
- YAML and TOML are not supported formats for site config. Only javascript is supported for
.vitepress/config.js - Plugins support, features are implemented in themes
- permalink support
.vitepress/templates- Components in
.vitepress/componentsare not auto registered as global components
- YAML and TOML are not supported formats for site config. Only javascript is supported for
- Differences
- Public files that are directly copied to dist root moved from
.vitepress/public/ispublic/ - styling
.vitepress/styles/index.styland.vitepress/styles/palette.stylis.vitepress/style.styl - App Level Enhancements API, app enhancements
.vitepress/enhanceApp.jsis.vitepress/theme/index.js.
- Public files that are directly copied to dist root moved from
Markdown
- Missing
- Support for toml in frontmatter
- details block
- markdown slots guide/using-vue.html#using-components).
~prefix to explicitly specify a url is a webpack module request
Site Config
- Missing
tempdestthemefrom a dependencypermalinkportshouldPrefetchcacheextraWatchFilespatternspluginsmarkdown.pageSuffixmarkdown.slugifymarkdown.pluginsmarkdown.extractHeadersmarkdown.extendMarkdowntomarkdown.configconfigureWebpack,chainWebpack,postcss,Stylus,scss,Sass,lessconfigsevergreen
Default Theme Config
- Missing
smoothScrolldisplayAllHeadersactiveHeaderLinkssidebarDepthandinitialOpenGroupIndexfor sidebar groups
- Differences
searchMaxSuggestionsissearch.maxSuggestionsalgoliaissearch.algoliasearchPlaceholderissearch.placeholder
Default Theme
- Missing
Computed Globals
- Missing
$lang$localePath
Frontmatter Predefined Variables
- Missing
descriptionmetametaTitlelanglayoutpermalinkcanonicalUrl
Frontmatter Default Theme Variables
siteData
- Missing
pageData
- Missing
keypathregularPath
Global Components
- Missing