Showcase: Ultra-lightweight native MathML formula rendering in MDX docs #2685
x-at-01
started this conversation in
Show and tell
Replies: 1 comment 1 reply
-
|
Thanks for sharing @xtco3o! |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
MDX blends Markdown with JSX, giving developers rich customization capabilities. When rendering equations inside MDX, loading KaTeX/MathJax assets or CSS files inside components introduces bundle bloat.
Native MathML Core
By utilizing native MathML Core (fully supported by Chrome 109+, Safari, and Firefox), we can compile TeX formulas directly to native HTML
<math>tags. This runs completely layout-engine free in the client.We created @webc.site/math:
It can be easily integrated as an AST transformer plugin inside the MDX compilation pipeline, keeping React/Vue/Svelte MDX component outputs super lightweight!
Beta Was this translation helpful? Give feedback.
All reactions