feat(mdx): add siteConfig.markdown.format to configure the default content parser (MDX / CommonMark) (#9097)

This commit is contained in:
Sébastien Lorber 2023-06-23 18:15:05 +02:00 committed by GitHub
parent be4e67caa9
commit cc6d9696f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 304 additions and 83 deletions

View file

@ -235,6 +235,7 @@ export async function createProcessorCached({
const format = getFormat({
filePath,
frontMatterFormat: mdxFrontMatter.format,
markdownConfigFormat: reqOptions.markdownConfig.format,
});
return format === 'md' ? compilers.mdProcessor : compilers.mdxProcessor;