Skip to content

Commit 6be8037

Browse files
authored
docs: replace CJS style config with ESM in docs (#3282)
1 parent 0f02697 commit 6be8037

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Diff for: docs/guide/markdown.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -852,10 +852,11 @@ $$ x = {-b \pm \sqrt{b^2-4ac} \over 2a} $$
852852
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`:
853853

854854
```js
855+
import { defineConfig } from 'vitepress'
855856
import markdownItAnchor from 'markdown-it-anchor'
856857
import markdownItFoo from 'markdown-it-foo'
857858

858-
module.exports = {
859+
export default defineConfig({
859860
markdown: {
860861
// options for markdown-it-anchor
861862
// https://github.com/valeriangalliat/markdown-it-anchor#usage
@@ -872,7 +873,7 @@ module.exports = {
872873
md.use(markdownItFoo)
873874
}
874875
}
875-
}
876+
})
876877
```
877878

878879
See full list of configurable properties in [Config Reference: App Config](../reference/site-config#markdown).

0 commit comments

Comments
 (0)