Closed DonClysdale closed 1 year ago
The official Asciidoctor Diagram doesn't support Node.js. So, I don't plan to support for diagrams like Mermaid by default.
Having said that, I'll see whether it is possible to support Mermaid diagrams like I did for build time syntax highlighting for Asciidocs.
@DonClysdale I checked the feasibility of rendering Mermaid.js diagrams on build side. Unfortunately, Mermaid.js only renders the charts within a browser. The approaches out there are using headless browsers to render the charts. It is out of the scope of this plugin.
I recommend using a literal or code block of AsciiDoc to write Mermaid code, and use client-side rendering.
Here, https://github.com/saneef/eleventy-plugin-asciidoc-tester/commit/10414eede83f215aed3aef8ee2c0c13883f28f23, is how I set up client-side rendering of Mermaid.js with AsciiDoc.
It would be really nice to support Mermaid and asciidoctor diagrams in asciidoc pages, like mermaid diagrams are supported in eleventy for markdown pages.