-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve markdown infrastructure: global markdown config, new lifecycles... #4625
Comments
Edit by @slorber: context is (#3018 (comment)) I write notes of whatever I study in markdown files organized into folders. I use vscode-markdown-preview-enhanced, which works perfectly for all my use-cases. I need my content to be accessible, on other devices like mobile, for revision purposes. I was thinking to host a local server which serves As I'm not familiar with front-end development, it's confusing to configure and I don't understand much. But the link which you have provided is fine for me. I will configure it. |
The markdown global infrastructure should allow site owners and themes to register mdx components and scope. This would remove the need to use mdx imports, and also ensure the blog post RSS feed can evaluate MDX nodes properly. See also #5664 |
Question: won't this conflict with #3018? Are we going to allow swapping out Markdown parsers, or are we going to build our infrastructure on MDX? |
When using CommonMark, we'll likely inject the markdown in components prop as JSON AST, rendered on the client with https://github.com/remarkjs/react-markdown It should be technically possible to replace things like |
My definitive goal is that the Docusaurus site could render the same in both CommonMark + MDX, with a simple config switch and CI tests for each mode. This might need some docs adjustments but I believe it should be possible without removing any existing feature. |
🚀 Feature
Problems to solve:
We should allow users to configure default markdown config globally, change Docusaurus Markdown defaults, and make it possible to create markdown-related Docusaurus plugins.
A good example would be to create a "docusaurus-plugin-latex" so that scientists can more easily adopt Docusaurus without having to go through more complicated steps (see https://docs.theochu.com/docusaurus/latex/)
Related to #3018
The text was updated successfully, but these errors were encountered: