hikerpig / foam-template-gatsby-kb

A Foam/Obsidian template using gatsby-theme-kb for publishing your knowledge base
https://foam-template-gatsby-kb.hikerpig.vercel.app
60 stars 12 forks source link

Include mermaid diagrams #16

Open bellons91 opened 7 months ago

bellons91 commented 7 months ago

Add mermaid rendering.

When a user adds a mermaid block like

sequenceDiagram
    Alice->>John: Hello John, how are you?
    John-->>Alice: Great!
    Alice-)John: See you later!

The diagram should be rendered automatically.

hikerpig commented 7 months ago

I believe there are some gatsby plugins for mermaid https://www.gatsbyjs.com/plugins/gatsby-remark-mermaid/ . PRs are welcome.