Kellen
Stuff I Learned

Follow

Stuff I Learned

Follow

Add mermaid-js to mkdocs

Kellen's photo
Kellen
·Apr 21, 2021·

1 min read

If you're using mkdocs, you may be interested in creating visual diagrams with mermaid.

Adding mermaid to your mkdocs project is fairly easy. First, install mkdocs-mermaid2-plugin using pip install mkdocs-mermaid2-plugin.

Add the following to mkdocs.yml:

plugins:
    - search
    - mermaid2

('search' should already exist here)

Add this to the mkdocs.yml file as well:

extra_javascript:
    - https://unpkg.com/mermaid/dist/mermaid.min.js

And that's it!

 
Share this