-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Open
Description
Description
I want to enhance the project to support rendering raw Markdown (.md) files.
Why is this better?
Markdown files are less strict than .mdx files because they do not need to render JSX components. Therefore, issues like unclosed HTML tags remain valid in .md files.
Additionally, .md files are more common than .mdx. For example, .md files are supported by many popular static site generators and note-taking apps.
Proposed change in contentlayer.config.ts:
// ...
filePathPattern: 'blog/**/*.{md,mdx}', // old value: blog/**/*.mdx
// ...This should not break anything for the following reasons:
- Same rendering pipeline: It still uses the same
contentlayer2library to process both.mdxand.mdfiles. - Backward compatible: Adding
.mdsupport does not change how.mdxfiles are processed. - Already proven: My website [minhdq.dev](https://minhdq.dev) is currently using both
.mdand.mdxwithcontentlayer2v0.5.5 without issues.
Related issues:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels