sonnyp / mermaid-webkitgtk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mermaid WebkitGTK renderer

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

CLI

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

Pandoc filter

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

Contributing

make
# make changes
make test

License

ISC

About


Languages

Language:JavaScript 96.8%Language:Mermaid 1.9%Language:Makefile 1.3%