From 74c6ecaaeb2185826f637c327fa7373e222824ad Mon Sep 17 00:00:00 2001 From: SigureMo Date: Fri, 1 Dec 2023 20:23:19 +0800 Subject: [PATCH] docs: replace CJS style config with ESM in docs --- 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 1740bd783fa4..c7fcbd47b2fe 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).