Markdown Behavior Config
The following options change Markdown renderer behaviors, and can be set under markdown property in theme options.
markdown.gfm
- Type:
boolean - Default:
false - Details:
Whether to support GFM.
Important
Only common GFM syntax are supported, and some of the behaviors might be different.
For example, to support Vue syntax, <script> tags are allowed
in VuePress.
markdown.vPre
- Type:
boolean - Default:
false - Details:
Whether to enable v-pre wrapper.
markdown.breaks
- Type:
boolean - Default:
false - Enabled in GFM: Yes
- Details:
Whether convert \n in paragraphs into <br>s
markdown.linkify
- Type:
boolean - Default:
false - Enabled in GFM: Yes
- Details:
Whether convert URL-like text into links
markdown.figure
- Type:
boolean - Default:
false - Details:
Whether to convert standalone <img> into <figure>.
markdown.imgLazyload
- Type:
boolean - Default:
false - Details:
Whether to enable lazy loading for images in Markdown.
markdown.highlighter
Type:
MarkdownHighlighterOptions | "prismjs" | "shiki" | falsetype MarkdownHighlighterOptions = | ({ type: "prismjs" } & PrismjsPluginOptions) | ({ type: "shiki" } & ShikiPluginOptions);Default:
"shiki"Details:
Controls Markdown code block highlighter. You can choose "prismjs", "shiki", false or an object with type field declaring the highlighter name and other plugin options.
"prismjs": Use @vuepress/plugin-prismjs."shiki": Use @vuepress/plugin-shiki.false: Disable code block highlighting.
markdown.linksCheck Enabled by default
- Type:
LinksCheckPluginOptions | Options - Default:
true - Details:
Whether to enable @vuepress/plugin-links-check plugin, which provides link check for Markdown. You can manually set a boolean value to control the plugin status, or provide plugin options.
Changelog
68504-on1b917-on22787-on