Skip to content

Instantly share code, notes, and snippets.

@CamilleMo
Last active January 11, 2020 19:14
Show Gist options
  • Save CamilleMo/46552c10329ee8fc2ba4a7d6953e1cb4 to your computer and use it in GitHub Desktop.
Save CamilleMo/46552c10329ee8fc2ba4a7d6953e1cb4 to your computer and use it in GitHub Desktop.
How to create a mkdocs site with mermaid

Install MkDocs

pip install mkdocs

Activate Mermaid

Add the javascript file in the yml :

site_name: My Docs 

extra_javascript:
    - https://cdnjs.cloudflare.com/ajax/libs/mermaid/8.4.4/mermaid.min.js

Add this line at the top of each page :

<script>mermaid.initialize({startOnLoad:true});</script>

Add Theming :

pip install mkdocs-bootswatch

and update the yml file :

site_name: My Docs 

extra_javascript:
    - https://cdnjs.cloudflare.com/ajax/libs/mermaid/8.4.4/mermaid.min.js

theme: flatly
https://universitedauphine-my.sharepoint.com/:u:/g/personal/camille_moatti_dauphine_eu/EYGdj3MOAjNGt2ZURfxGk5ABathWzJ21pA-oi5JRpwpnew?e=398Sfp
https://universitedauphine-my.sharepoint.com/:u:/g/personal/camille_moatti_dauphine_eu/EYGdj3MOAjNGt2ZURfxGk5ABathWzJ21pA-oi5JRpwpnew?download=1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment