Mermaid is a Markdown-inspired syntax to create diagrams. It provides a browser/JavaScipt API which can render to SVG.
This is a collection of utils to use WebkitGTK to render mermaid graphs.
Requirements: GJS, WebKitGTK >= 2.42
There is mermaid-cli which uses the JavaScript API in Puppeteer.
This is an alternative and lighter renderer making use of WebKitGTK.
> ./src/cli --help
At the moment it only supports the input
and ouput
parameters of mermaid-cli
.
> ./src/cli.js --input input.mmd --output output.svg
Here is an example of a pandoc command which takes a markdown file as input and outputs an html file.
And use the filter here to turn mermaid code blocks into inline SVGs.
> pandoc -t html -F ./src/pandoc-filter.js -o example.html example.md
make
# make changes
make test
ISC