Skip to content

Commit

Permalink
fix: drop markdown.mdc option, plugin can be controlled vie `markdo…
Browse files Browse the repository at this point in the history
…wn.remarkPlugins`
  • Loading branch information
farnabaz committed Nov 15, 2024
1 parent b5b7759 commit 1cf4cbd
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 32 deletions.
26 changes: 0 additions & 26 deletions docs/content/docs/1.getting-started/3.configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`


Expand Down
6 changes: 0 additions & 6 deletions src/types/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
1 change: 1 addition & 0 deletions src/utils/content/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1cf4cbd

Please sign in to comment.