Migration to Latest
Legacy Mode
You can pass the second argument true
to enable legacy mode when calling mdEnhancePlugin
, and the plugin will try to run with V1 behavior.
New Features
v-pre
supportThe following container support is removed, so
vPre
option is added::: v-pre Some {{vue syntax}}. :::
Use
component
code block to add components easilyChart.js support
Adds chart.js support via
chart
option::: chart Title ```json { // chart.js config } ``` ::: ::: chart Title ```js const config = { // chart.js config }; ``` :::
ECharts support
Adds ECharts support via
echarts
option::: echarts Title ```json { // chart.js config } ``` ::: ::: echarts Title ```js const option = { // chart.js config }; ``` :::
content include support
Use
<!-- @include: -->
to include other file content in Markdown viainclude
options.Use
<!-- @include: filename -->
to include a file.To partially import the file, you can specify the range of lines to be included:
<!-- @include: filename{start-end} -->
<!-- @include: filename{start-} -->
<!-- @include: filename{-end} -->
Also, you can include file region:
<!-- @include: filename#region -->
markmap support
Add
markmap
container to create Markmap viamarkmap
option.Playground
Embed interactive demo with official presets and custom options
Kotlin Playground
Provide Kotlin playground via
kotlin-playground
Vue Playground
Provide Vue playground via
@vue/repl
Changed
Now all options are disabled by default
Code demo syntax changed
Before:
::: demo Title <!-- demo content --> ::: ::: demo [vue] Title <!-- demo content --> ::: ::: demo [react] Title <!-- demo content --> :::
After:
::: normal-demo Title <!-- demo content --> ::: ::: vue-demo Title <!-- demo content --> ::: ::: react-demo Title <!-- demo content --> :::
Removed Options
enableAll
removedThere are too many noob users who don't know what they are doing, and they just enable this option without using all the feature provided, yet they complain about load speed.
lineNumbers
removedVuePress 2 supports line number config per code block now.
imageFix
removedMr.Hope already made a PR to fix broken image links in Markdown, so it's no longer needed
alert
removedPlease use
@vuepress/plugin-markdown-hint
insteadcontainer
,hint
removedPlease use
@vuepress/plugin-markdown-hint
insteadimageLazyload
,lazyload
imgLazyload
removedPlease use
@vuepress/plugin-markdown-image
insteadimageTitle
,figure
removedPlease use
@vuepress/plugin-markdown-image
insteadimageMark
,imgMark
removedPlease use
@vuepress/plugin-markdown-image
insteadimgSize
,imageSize
removedPlease use
@vuepress/plugin-markdown-image
insteadtex
,katex
,mathjax
removedPlease use
@vuepress/plugin-markdown-math
insteadcodegroup
,codetabs
removedPlease use
@vuepress/plugin-markdown-tab
insteadtabs
removedPlease use
@vuepress/plugin-markdown-tab
insteadpresentation
revealJs
revealjs
removedPlease use
@vuepress/plugin-revealjs
instead
Options Adjustments in Pre-release Version
mdImport
is renamed toinclude
vpre
is renamed tovPre
card
is replaced bycomponents
mermaid
vuePlayground
no longer accept lib options