Skip to main content

Command Palette

Search for a command to run...

Add mermaid-js to mkdocs

Published
•1 min read•View as Markdown

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!

More from this blog

Stuff I Learned

18 posts

I'm a full stack developer, musician, and educator living in Minneapolis.