logoalt Hacker News

nickmain • today at 5:58 PM • 2 replies • view on HN

Does the official Mermaid library still require a full or headless browser environment in order to lay out the SVG? If so, Pele is great news for embedding Mermaid rendering in other places.


Replies

falsaberN1 • today at 9:44 PM

There is also Merman on Github that outputs a SVG.

https://github.com/Latias94/merman

invokestatic • today at 7:49 PM

The python mermaidx library works for this, which works well for generating documentation with embedded diagrams as part of CI/CD but the layout/rendering can sometimes be very wonky. For instance I will have a bunch of connections crossing over each other instead of neatly arranged to avoid it. Changing the layout settings does not fix it so sometimes I will just export it from mmdc and embed a png.