2.0.0-rc.0 • Published 10 days ago

@vuepress/plugin-theme-data v2.0.0-rc.0

Weekly downloads
-
License
MIT
Repository
github
Last release
10 days ago

vuepress-next

github check github docs npm license

Status: Alpha

The codebase has been completely refactored with TypeScript. Some major changes:

  • Fully migrated to Vue 3
  • Extract @vuepress/cli from vuepress package
  • Extract @vuepress/client from @vuepress/core package
  • Extract @vuepress/bundler-webpack from @vuepress/core package and migrate to webpack 5
    • As webpack is decoupled with core, other bundlers are also possible to be supported
  • Extract @vuepress/plugin-palette 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.

Documentation

https://vuepress.github.io

Contribution

See Contributing Guide.

Breaking Changes

Temporarily record some breaking changes here.

Core

User config

  • shouldPrefetch -> the default value is changed to false
  • patterns -> pagePatterns
  • extraWatchFiles -> removed, watch files manually in onWatched hook
  • evergreen -> the default value is changed to true
  • markdown
    • markdown.lineNumbers -> markdown.code.lineNumbers, and the default value is changed to true
    • markdown.slugify -> removed
    • markdown.pageSuffix -> removed
    • markdown.externalLinks -> markdown.links.externalAttrs
    • markdown.toc -> changed
    • markdown.plugins -> removed
    • markdown.extendMarkdown -> removed
    • markdown.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

Conventional files and directories

  • .vuepress/enhanceApp.js -> .vuepress/clientAppEnhance.{js,ts}
  • .vuepress/components -> will not auto register components, and you need to register your components manually in .vuepress/clientAppEnhance.{js,ts}

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 palette system reusable, it's extracted to @vuepress/plugin-palette.

Theme authors can use their own way for users to configure styles (not be limited with stylus as VuePress 1.0).

Frontmatter

  • meta -> head, which uses the same type with siteConfig.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 -> onWatched
  • generated -> onGenerated
  • additionalPages -> removed, use app.pages.push(createPage()) in onInitialized hook
  • clientDynamicModules -> removed, use app.writeTemp() in onPrepared hook
  • enhanceAppFiles -> clientAppEnhanceFiles
  • globalUIComponents -> clientAppRootComponentFiles
  • clientRootMixin -> clientAppSetupFiles
  • extendMarkdown -> extendsMarkdown
  • chainMarkdown -> removed
  • extendPageData -> extendsPageData
  • extendsCli -> removed
  • configureWebpack -> removed
  • chainWebpack -> removed
  • beforeDevServer -> removed
  • afterDevServer -> removed

Theme API

  • .vuepress/theme -> won't be used as theme implicitly if the path exists, and set the path explicitly via theme option.

  • 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

  • eject command -> removed
  • -c, --cache [cache] -> --cache <cache> - the shorthand -c is not for cache option, and the value of cache option is not optional
  • --no-cache -> --clean-cache

Default Theme

  • <CodeGroup />, <CodeBlock /> -> <CodeGroup />, <CodeGroupItem />
  • <Badge />
    • $badgeErrorColor -> $badgeDangerColor
    • type prop only accepts tip, warning and danger
  • Default theme config has changed a lot. Please checkout the types definition and our docs/.vuepress/config.ts as reference
@huan_kong/vuepress-theme-gungnirvuepress-theme-lcx@everything-registry/sub-chunk-995vmihailenco-vuepress-theme-defaultvuepress-theme-tzztmx-theme-default@bfehub/vuepress-theme-vmi@celesta/vuepress-theme-celesta@coolcoffee/vuepress-theme-landflowzyl870138612vuepress-theme-hopevuepress-theme-dumivuepress-theme-dumi2vuepress-theme-delicatevuepress-theme-gungnirvuepress-theme-teadocsvuepress-theme-stellavuepress-theme-quicksandvuepress-theme-recovuepress-plugin-alertvuepress-theme-bvarvuepress-theme-anemosvuepress-theme-aliasingvuepress-theme-zpvuepress-theme-wayvuepress-theme-wenbinvuepress-theme-junkvuepress-theme-kingvuepress-theme-mixvuepress-theme-moon@featherds/vuepress-theme-featherds@infinitebrahmanuniverse/nolb-_vuep@lando/vuepress-theme-default-plus@libybai/vuepress-theme-libybai@mr-huang/vuepress-theme-weasel@nesercode/vuepress-theme-nesercode@qcyblm/vuepress-theme-vpx@starzkg/vuepress-shared@starzkg/vuepress-star-shared@starzkg/vuepress-theme-star@starzkg/vuepress-plugin-page-enhance@starzkg/vuepress-plugin-page-info@starzkg/vuepress-plugin-comment@starzkg/vuepress-plugin-components-star@nova-cbb/vuepress-theme@panzhiyue/vuepress-theme-knowledge@pengzhanbo/vuepress-theme-plume@calibur/vuepress-theme-evadwspace-blog-themedwritingspace-blog-theme@vmidoc/vuepress-theme-vmidoc@whats-blog/vuepress-theme-next@vuepress/theme-default@vuepress-reco/shared@vuepress-reco/style-default@vuepress-reco/vuepress-plugin-bulletin-popover@vuepress-plume/vuepress-theme-plume@vuepress-reco/vuepress-plugin-comments@zalastax/nolb-_vuep@yanyu-fe/vuepress-theme-dumi
2.0.0-rc.66

10 days ago

2.0.0-rc.64

17 days ago

2.0.0-rc.62

18 days ago

2.0.0-rc.63

17 days ago

2.0.0-rc.61

1 month ago

2.0.0-rc.60

2 months ago

2.0.0-rc.57

2 months ago

2.0.0-rc.56

2 months ago

2.0.0-rc.55

2 months ago

2.0.0-rc.54

2 months ago

2.0.0-rc.52

3 months ago

2.0.0-rc.46

3 months ago

2.0.0-rc.47

3 months ago

2.0.0-rc.44

3 months ago

2.0.0-rc.43

3 months ago

2.0.0-rc.42

4 months ago

2.0.0-rc.41

4 months ago

2.0.0-rc.40

5 months ago

2.0.0-rc.39

5 months ago

2.0.0-rc.37

6 months ago

2.0.0-rc.38

5 months ago

2.0.0-rc.36

6 months ago

2.0.0-rc.34

7 months ago

2.0.0-rc.33

7 months ago

2.0.0-rc.31

7 months ago

2.0.0-rc.30

7 months ago

2.0.0-rc.28

8 months ago

2.0.0-rc.27

8 months ago

2.0.0-rc.26

8 months ago

2.0.0-rc.21

9 months ago

2.0.0-rc.18

10 months ago

2.0.0-rc.15

10 months ago

2.0.0-rc.14

11 months ago

2.0.0-rc.12

11 months ago

2.0.0-rc.11

11 months ago

2.0.0-rc.10

11 months ago

2.0.0-rc.7

11 months ago

2.0.0-rc.3

11 months ago

2.0.0-rc.1

11 months ago

2.0.0-beta.66

1 year ago

2.0.0-beta.65

1 year ago

2.0.0-beta.64

1 year ago

2.0.0-beta.68

1 year ago

2.0.0-beta.67

1 year ago

2.0.0-rc.0

1 year ago

2.0.0-beta.63

2 years ago

2.0.0-beta.62

2 years ago

2.0.0-beta.61

2 years ago

2.0.0-beta.60

2 years ago

2.0.0-beta.55

2 years ago

2.0.0-beta.54

2 years ago

2.0.0-beta.53

2 years ago

2.0.0-beta.52

2 years ago

2.0.0-beta.59

2 years ago

2.0.0-beta.58

2 years ago

2.0.0-beta.57

2 years ago

2.0.0-beta.56

2 years ago

2.0.0-beta.51

2 years ago

2.0.0-beta.50

2 years ago

2.0.0-beta.49

2 years ago

2.0.0-beta.48

3 years ago

2.0.0-beta.47

3 years ago

2.0.0-beta.40

3 years ago

2.0.0-beta.44

3 years ago

2.0.0-beta.43

3 years ago

2.0.0-beta.42

3 years ago

2.0.0-beta.41

3 years ago

2.0.0-beta.46

3 years ago

2.0.0-beta.45

3 years ago

2.0.0-beta.38

3 years ago

2.0.0-beta.37

3 years ago

2.0.0-beta.36

3 years ago

2.0.0-beta.29

3 years ago

2.0.0-beta.28

3 years ago

2.0.0-beta.33

3 years ago

2.0.0-beta.32

3 years ago

2.0.0-beta.35

3 years ago

2.0.0-beta.34

3 years ago

2.0.0-beta.27

3 years ago

2.0.0-beta.26

3 years ago

2.0.0-beta.25

3 years ago

2.0.0-beta.24

3 years ago

2.0.0-beta.23

3 years ago

2.0.0-beta.22

3 years ago

2.0.0-beta.21

3 years ago

2.0.0-beta.20

3 years ago

2.0.0-beta.19

4 years ago

2.0.0-beta.15

4 years ago

2.0.0-beta.18

4 years ago

2.0.0-beta.17

4 years ago

2.0.0-beta.9

4 years ago

2.0.0-beta.11

4 years ago

2.0.0-beta.10

4 years ago

2.0.0-beta.14

4 years ago

2.0.0-beta.13

4 years ago

2.0.0-beta.12

4 years ago

2.0.0-beta.8

4 years ago

2.0.0-beta.7

4 years ago

2.0.0-beta.6

4 years ago

2.0.0-beta.5

4 years ago

2.0.0-beta.4

4 years ago

2.0.0-beta.1

4 years ago

2.0.0-beta.0

4 years ago

2.0.0-alpha.25

4 years ago