From 1cf4cbdcef48fa0d82fcff82ec43dedb1d70233c Mon Sep 17 00:00:00 2001 From: Farnabaz Date: Fri, 15 Nov 2024 13:57:21 +0100 Subject: [PATCH] fix: drop `markdown.mdc` option, plugin can be controlled vie `markdown.remarkPlugins` --- .../docs/1.getting-started/3.configuration.md | 26 ------------------- src/types/module.ts | 6 ----- src/utils/content/index.ts | 1 + 3 files changed, 1 insertion(+), 32 deletions(-) diff --git a/docs/content/docs/1.getting-started/3.configuration.md b/docs/content/docs/1.getting-started/3.configuration.md index 8ef68d312..d4f4b2e46 100644 --- a/docs/content/docs/1.getting-started/3.configuration.md +++ b/docs/content/docs/1.getting-started/3.configuration.md @@ -21,32 +21,6 @@ Nuxt Content read and parse all the available contents at built time. This optio Configure markdown parser. -#### `mdc` - -::code-group -```ts [Default] -mdc: true -``` -```ts [Signature] -type Mdc = boolean -``` -:: - -If you wish to disable MDC syntax support in your contents, you can set this option to `false`. - -```ts [nuxt.config.ts] -export default defineNuxtConfig({ - content: { - build: { - markdown: { - // Disable MDC syntax support - mdc: false, - } - } - } -}) -``` - #### `toc` diff --git a/src/types/module.ts b/src/types/module.ts index 7ae6c6487..0df4e7e29 100644 --- a/src/types/module.ts +++ b/src/types/module.ts @@ -56,12 +56,6 @@ export interface ModuleOptions { } build: { markdown: { - /** - * Whether MDC syntax should be supported or not. - * - * @default true - */ - mdc?: boolean /** * Control behavior of Table of Contents generation */ diff --git a/src/utils/content/index.ts b/src/utils/content/index.ts index 06a7d4fdb..7e8a981c9 100644 --- a/src/utils/content/index.ts +++ b/src/utils/content/index.ts @@ -104,6 +104,7 @@ export async function parseContent(key: string, content: string, collection: Res markdown: { compress: true, ...mdcOptions, + ...contentOptions, rehypePlugins: { highlight: mdcOptions.highlight === false ? undefined