-
|
Hi, is there any method or extension that would allow docusaurus to support adding CSS classes to content, for example Such syntax is supported by many markdown libraries and we already use it in our content, and we'd like to be able to switch to docusaurus without modifying our existing markdown files... |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
Hi, for now there isn't one in Docusaurus. You can always build your own Remark plugin to do this: https://docusaurus.io/docs/markdown-features/plugins#creating-new-rehyperemark-plugins We are aware of a potential solution: https://github.com/remarkjs/remark-directive But that's for MDX v2 while we are on MDX v1. We are soon planning for a version bump (which requires us to migrate our codebase from CJS to ESM), after which you should be able to enjoy this feature out-of-the-box. |
Beta Was this translation helpful? Give feedback.
-
|
Thank you very much! |
Beta Was this translation helpful? Give feedback.
Hi, for now there isn't one in Docusaurus. You can always build your own Remark plugin to do this: https://docusaurus.io/docs/markdown-features/plugins#creating-new-rehyperemark-plugins
We are aware of a potential solution: https://github.com/remarkjs/remark-directive But that's for MDX v2 while we are on MDX v1. We are soon planning for a version bump (which requires us to migrate our codebase from CJS to ESM), after which you should be able to enjoy this feature out-of-the-box.