Generate Markdown from MDX #11295
Answered
by
slorber
peterpeterparker
asked this question in
Q&A
-
|
Hi, Is there an option or build command to generate Markdown files from MDX? I'm kind of extensively using MDX in the source of my documentation and want to build an |
Beta Was this translation helpful? Give feedback.
Answered by
slorber
Jun 29, 2025
Replies: 1 comment 3 replies
-
|
Ah, I guess I can follow the same path that was shared there: #10899 (comment) but, still somehow needs a way to generate MD from MDX |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is no way to generate MD from MDX because MDX is more expressive than MD and let you embed React components within MD. Components can be interactive, and translating them to MD can be impossible, requiring running them to determine what they render and then converting the resulting HTML to a string. HTML is also more expressive than MD (but it's not interactive), but at least it could be embedded in MD docs.
What we do for the blog RSS feed content is we run the static site generation, and then read the static HTML files we output to create the HTML feed content. This permits to ensure you get all your MDX components pre-rendered to HTML (or course, we lose the interactivity side bu…