From 6be80372ad24ba0e46b1e0a81e89e190944744c5 Mon Sep 17 00:00:00 2001 From: Nyakku Shigure Date: Sat, 2 Dec 2023 00:44:08 +0800 Subject: [PATCH] docs: replace CJS style config with ESM in docs (#3282) --- docs/guide/markdown.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/guide/markdown.md b/docs/guide/markdown.md index 1740bd78..c7fcbd47 100644 --- a/docs/guide/markdown.md +++ b/docs/guide/markdown.md @@ -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 @@ -872,7 +873,7 @@ module.exports = { md.use(markdownItFoo) } } -} +}) ``` See full list of configurable properties in [Config Reference: App Config](../reference/site-config#markdown).