docs: replace CJS style config with ESM in docs (#3282)

pull/3285/head
Nyakku Shigure 1 year ago committed by GitHub
parent 0f02697353
commit 6be80372ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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`: 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 ```js
import { defineConfig } from 'vitepress'
import markdownItAnchor from 'markdown-it-anchor' import markdownItAnchor from 'markdown-it-anchor'
import markdownItFoo from 'markdown-it-foo' import markdownItFoo from 'markdown-it-foo'
module.exports = { export default defineConfig({
markdown: { markdown: {
// options for markdown-it-anchor // options for markdown-it-anchor
// https://github.com/valeriangalliat/markdown-it-anchor#usage // https://github.com/valeriangalliat/markdown-it-anchor#usage
@ -872,7 +873,7 @@ module.exports = {
md.use(markdownItFoo) md.use(markdownItFoo)
} }
} }
} })
``` ```
See full list of configurable properties in [Config Reference: App Config](../reference/site-config#markdown). See full list of configurable properties in [Config Reference: App Config](../reference/site-config#markdown).

Loading…
Cancel
Save