Add mermaid-js to mkdocs
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!