@vuepress/client v2.0.0-rc.2
vuepress-next
Status: Alpha
The codebase has been completely refactored with TypeScript. Some major changes:
- Fully migrated to Vue 3
- Extract
@vuepress/cli
fromvuepress
package - Extract
@vuepress/client
from@vuepress/core
package - Extract
@vuepress/bundler-webpack
from@vuepress/core
package - other bundlers are also possible to be supported - Extract
@vuepress/plugin-palette-stylus
from@vuepress/core
package - stylus is no longer the default CSS pre-processor, and the way of styles customization should be determined by theme
The documentation has not finished yet. For now you can check out the breaking changes list below as migration reference.
Contribution
See Contributing Guide.
TODO List
@vuepress/markdown
- snippetsPlugin
Official plugins
- @vuepress/plugin-pwa
Documentation
- Guide
- References
- API
- Migration Guide
Breaking Changes
Temporarily record some breaking changes here.
Core
User config
shouldPrefetch
-> the default value is changed tofalse
patterns
->pagePatterns
extraWatchFiles
-> removedevergreen
-> the default value is changed totrue
markdown
markdown.lineNumbers
->markdown.code.lineNumbers
, and the default value is changed totrue
markdown.slugify
-> removedmarkdown.pageSuffix
-> removedmarkdown.externalLinks
->markdown.links.externalAttrs
markdown.toc
-> changedmarkdown.plugins
-> removedmarkdown.extendMarkdown
-> removedmarkdown.extractHeaders
-> changed
- All webpack related configs are moved to
bundlerConfig
(with@vuepress/bundler-webpack
)postcss
->bundlerConfig.postcss
stylus
->bundlerConfig.stylus
scss
->bundlerConfig.scss
sass
->bundlerConfig.sass
less
->bundlerConfig.less
chainWebpack
->bundlerConfig.chainWebpack
configureWebpack
->bundlerConfig.configureWebpack
Permalink patterns
:i_month
-> removed:i_day
-> removed:minutes
-> removed (undocumented in 1.0):seconds
-> removed (undocumented in 1.0):regular
->:raw
Stylus Palette system
The stylus palette system of Vuepress 1.0 (i.e. styles/palette.styl
and styles/index.styl
) will only work in default theme.
To make the stylus palette system reusable, it's extracted to @vuepress/plugin-palette-stylus
.
Theme authors can use their own way for users to configure styles (not be limited with stylus).
Frontmatter
meta
->head
, which uses the same type withsiteConfig.head
For example:
head: - - meta - name: foo content: bar - - link - rel: canonical href: foobar - - script - {} - console.log('hello from frontmatter');
Has the same structure with:
// .vuepress/config.js module.exports = { // ... head: [ ['meta', { name: 'foo', content: 'bar' }], ['link', { rel: 'canonical', href: 'foobar' }], ['script', {}, `console.log('hello from frontmatter');`], ], // ... }
Plugin API
ready
->onPrepared
updated
-> removedgenerated
->onGenerated
additionalPages
-> removed, useapp.pages.push(createPage())
inonInitialized
hookclientDynamicModules
-> removed, useapp.writeTemp()
inonPrepared
hookenhanceAppFiles
->clientAppEnhanceFiles
globalUIComponents
->clientAppRootComponentFiles
clientRootMixin
->clientAppSetupFiles
extendMarkdown
->extendsMarkdown
extendPageData
->extendsPageData
extendsCli
-> removedconfigureWebpack
-> removedchainWebpack
-> removedbeforeDevServer
-> removedafterDevServer
-> removed
Theme API
extend
->extends
You can still inherit a parent theme with extends: 'parent-theme'
, which will extends the plugins, layouts, etc.
However, the @theme
and @parent-theme
aliases are not available now.
CLI
-c, --cache [cache]
->--cache <cache>
- the shorthand-c
is not forcache
option, and the value ofcache
option is not optional--no-cache
->--clean-cache
Default Theme
<CodeGroup>
,<CodeBlock>
-><CodeGroup>
,<CodeGroupItem>
- Default theme config has changed a lot. Please checkout the types definition and our
docs/.vuepress/config.ts
as reference
1 month ago
2 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
10 months ago
10 months ago
10 months ago
6 months ago
8 months ago
5 months ago
11 months ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago