# Add mermaid-js to mkdocs

If you're using mkdocs, you may be interested in creating visual diagrams with  [mermaid](https://mermaid-js.github.io/mermaid/#/README). 

Adding mermaid to your mkdocs project is fairly easy.  First, install [mkdocs-mermaid2-plugin](https://pypi.org/project/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!
