Skip to content

mdxConfig

mdxConfig is an object that is used to determine how content should be rendered in studiocms while using the MDX renderer.

Usage

astro.config.mjs
studioCMS({
rendererConfig: {
mdxConfig: {
remarkPlugins: [],
rehypePlugins: [],
recmaPlugins: [],
remarkRehypeOptions: {},
},
}
}),

This property has the following options:

remarkPlugins

  • Type: PluggableList | undefined

Allows the user to add compatible MDX remarkPlugins

rehypePlugins

  • Type: PluggableList | undefined

Allows the user to add compatible MDX rehypePlugins

recmaPlugins

  • Type: PluggableList | undefined

Allows the user to add recma plugins. This is a new ecosystem, currently in beta, to transform esast trees (JavaScript)

remarkRehypeOptions

  • Type: RemarkRehypeOptions | undefined

Options to pass through to remark-rehype (optional); the option allowDangerousHtml will always be set to true and the MDX nodes are passed through; In particular, you might want to pass configuration for footnotes if your content is not in English.

For more information about configuring MDX see the MDX Docs