Skip to content

Commit

Permalink
docs: replace CJS style config with ESM in docs (#3282)
Browse files Browse the repository at this point in the history
  • Loading branch information
SigureMo committed Dec 1, 2023
1 parent 0f02697 commit 6be8037
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/guide/markdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -852,10 +852,11 @@ $$ x = {-b \pm \sqrt{b^2-4ac} \over 2a} $$
VitePress uses [markdown-it](https://github.com/markdown-it/markdown-it) as the Markdown renderer. A lot of the extensions above are implemented via custom plugins. You can further customize the `markdown-it` instance using the `markdown` option in `.vitepress/config.js`:
```js
import { defineConfig } from 'vitepress'
import markdownItAnchor from 'markdown-it-anchor'
import markdownItFoo from 'markdown-it-foo'
module.exports = {
export default defineConfig({
markdown: {
// options for markdown-it-anchor
// https://github.com/valeriangalliat/markdown-it-anchor#usage
Expand All @@ -872,7 +873,7 @@ module.exports = {
md.use(markdownItFoo)
}
}
}
})
```
See full list of configurable properties in [Config Reference: App Config](../reference/site-config#markdown).

3 comments on commit 6be8037

@2loww
Copy link

@2loww 2loww commented on 6be8037 Dec 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

k9jiij88nk9

@2loww
Copy link

@2loww 2loww commented on 6be8037 Dec 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

``

@2loww
Copy link

@2loww 2loww commented on 6be8037 Dec 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iji

Please sign in to comment.