Let's say we have a content page Some-Topic/Some-Article.mdx. We could then store a draw.io diagram under Some-Topic/assets/myDiagram.drawio. The MDX page might looks something like this:
# Some Article
Here's a diagram to visualize this concept:
::drawio[assets/myDiagram.drawio]
The ::drawio leaf directive implementation would then make a call to the draw.io renderer (most likely at build time) and replace the directive with the resulting image.
Add support for SSR- or live-rendering draw.io diagrams from a draw.io a XML object in the codebase.
Under the hood, a
*.drawio
file looks like this:Let's say we have a content page
Some-Topic/Some-Article.mdx
. We could then store a draw.io diagram underSome-Topic/assets/myDiagram.drawio
. The MDX page might looks something like this:The
::drawio
leaf directive implementation would then make a call to the draw.io renderer (most likely at build time) and replace the directive with the resulting image.