-
I really like Docusaurus v2 and would like to use it for our docs site but we need to use standard Markdown, not MDX. Is there a way to swap the parser somehow? As a side note, I was quite surprised to learn about this detail relatively deep in the docs (here). I was expecting that Docusaurus would support Markdown easily, as it's one of the main claims on the homepage and there are a lot of 🏁 Summary: We discussed this below and in the JSX project itself (mdx-js/mdx#1125), eventually leading to RFC: CommonMark compatibility, supporting multiple markdown parsers #3018 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
Hi, https://mdxjs.com/getting-started#markdown says If you think features are missing in MDX, I think it's a bug to open on their repo, as clearly their intention is to support standard markdown. Not sure they mention commonmark in their doc, but it's mentionned in the issues: https://github.com/mdx-js/mdx/search?q=CommonMark&type=Issues
Yes, the v2 is alpha, and the doc can still be improved a lot, don't hesitate to contribute and submit a PR.
Each plugin implements the MD-based system of its choice, that's also a reason why this is under the Docs section, and not more "global". It is possible for you to fork the existing docs plugin based on MDX, and publish a non-MDX version of it.
What is markdown anyway? Does it specify how exactly the file has to be rendered to the end user? I don't think this is something what matters much, it's an implementation detail you should not have to care about.
To me that's more the opposite: the doc is plain markdown with interleaved JSX. I agree that it compiles the markdown to JSX in the end but it's an implementation detail.
We come to the most interesting part. So the main info we need for resolving this issue is: what constructs exactly do you need that are in Markdown, but don't work with MDX exactly? Is MDX really the problem? If they allowed the missing syntax that does not work currently? That's worth seeing if it's in their plans. If you can give us an exhaustive list of things from common marks that don't work but should work, that would definitively help. Also, how costly is it for you to modify a bit the existing markdown to make it work with current version of MDX? In our experience most v1 Docusaurus sites are able to migrate to v2 with only minor changes. Do you have another usecase for which updating the MD would be more annoying? |
Beta Was this translation helpful? Give feedback.
Hi,
https://mdxjs.com/getting-started#markdown says
MDX supports standard Markdown syntax
If you think features are missing in MDX, I think it's a bug to open on their repo, as clearly their intention is to support standard markdown.
Not sure they mention commonmark in their doc, but it's mentionned in the issues: https://github.com/mdx-js/mdx/search?q=CommonMark&type=Issues
Yes, the v2 is alpha, and the doc can still be improved a lot, don't hesitate to contribute and submit a PR.
Each plugin implements the MD-based system of its choice, that…