jobindjohn / obsidian-publish-mkdocs

A Template to Publish Obsidian/Foam Notes on Github Pages (uses MkDocs)
Creative Commons Zero v1.0 Universal
524 stars 37 forks source link

Mermaid is not rendering #13

Closed AlexMikhalev closed 2 years ago

AlexMikhalev commented 2 years ago

Firstly, great project John! I wish I saw it earlier - I created 6 websites in Zola just to do the same thing.

Obsidian supports mermaid, but the current mkdoc output isn't.

graph LR
        A[Knowledge Representation] --> B[model]
        B--> C[Ontology]
        B -->D[Data model]
        A-->E[Classification system]
        E -->F[Taxonomy]
        E -->G[Subject classification system]

The fix to my knowledge is to add <script src="https://cdn.jsdelivr.net/npm/mermaid@8.13.5/dist/mermaid.min.js" integrity="sha384-0yWn54pSGtfKCU+skfA69l25VsCw+MZt4LQov3xNRoS7YkAMrFokGgSBnAWSK4pv" crossorigin="anonymous"></script> or mermaid2 into plugins or

extra_javascript:
    - https://cdn.jsdelivr.net/npm/mermaid@8.13.5/dist/mermaid.min.js

I have no preference, your choice.

jobindjohn commented 2 years ago

Thanks for the fix and the PR, @AlexMikhalev!