mirror of
https://github.com/wahyd4/vuepress.git
synced 2026-08-26 21:55:52 +10:00
docs: markdown.config to markdown.extendMarkdown (close: #885)
This commit is contained in:
@@ -179,17 +179,17 @@ Options for [markdown-it-anchor](https://github.com/valeriangalliat/markdown-it-
|
||||
|
||||
Options for [markdown-it-table-of-contents](https://github.com/Oktavilla/markdown-it-table-of-contents). (Note: prefer `markdown.slugify` if you want to customize header ids.)
|
||||
|
||||
### markdown.config
|
||||
### markdown.extendMarkdown
|
||||
|
||||
- Type: `Function`
|
||||
- Default: `undefined`
|
||||
|
||||
A function to modify default config or apply additional plugins to the [markdown-it](https://github.com/markdown-it/markdown-it) instance used to render source files. Example:
|
||||
A function to modify default config or apply additional plugins to the [markdown-it](https://github.com/markdown-it/markdown-it) instance used to render source files. e.g.
|
||||
|
||||
``` js
|
||||
module.exports = {
|
||||
markdown: {
|
||||
config: md => {
|
||||
extendMarkdown: md => {
|
||||
md.set({ breaks: true })
|
||||
md.use(require('markdown-it-xxx'))
|
||||
}
|
||||
@@ -197,6 +197,10 @@ module.exports = {
|
||||
}
|
||||
```
|
||||
|
||||
::: tip
|
||||
This option is also included in [Plugin API](../plugin/README.md#extendmarkdown).
|
||||
:::
|
||||
|
||||
## Build Pipeline
|
||||
|
||||
### postcss
|
||||
|
||||
Reference in New Issue
Block a user