Render mermaid on github pages with simple code
See original GitHub issueI have been trying to find a way to render mermaid in markdown simply by using
```mermaid
# some mermaid code
```
in markdown, and use javascript in the page to render it.
I tried many solutions and faild. One of the solution I found is to use code from here but that’s not correct. I am wondering if the author of this awesome js can give me a solution to acheive that and add that to the documentation?
Also I could not find the docs folder @knsv mensioned in #215.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:9
- Comments:6
Top Results From Across the Web
How to make GitHub Pages Markdown support mermaid ...
Mermaid is a JavaScript based diagramming and charting tool that takes Markdown-inspired text definitions and creates diagrams dynamically in ...
Read more >Include diagrams in your Markdown files with Mermaid
Mermaid is a JavaScript based diagramming and charting tool that takes Markdown-inspired text definitions and creates diagrams dynamically ...
Read more >Mermaid Diagrams on GitHub ep 240 - YouTube
Mermaid allows for simple diagrams in Markdown and now it is supported on GitHub !
Read more >GitHub Diagrams with Mermaid | Blog
To get started using Mermaid all you need to do is create a code-fenced area using triple-backtick syntax and specify that your language...
Read more >Mermaid | Diagramming and charting tool
Create diagrams and visualizations using text and code. ... JavaScript based diagramming and charting tool that renders ... View on GitHub. Mermaid ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I found the solution. Just put everything after
<body>
.it works great on my site. If anyone need the source code, you can see these two files. _include/mermaid.html and _layout/post.html
Please update broken link.
That approach can be improved so that JS is injected only that page actually has Mermaid code in it.
The
<code class="language-mermaid">
approach is preferred because it is compatible with Typora.