Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/delreluca/mermaid-in-github-pages
https://github.com/delreluca/mermaid-in-github-pages
github-pages jekyll markdown mermaid mermaidjs
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/delreluca/mermaid-in-github-pages
- Owner: delreluca
- License: cc0-1.0
- Created: 2024-10-30T11:40:38.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-11-04T21:14:53.000Z (3 months ago)
- Last Synced: 2024-11-11T22:36:11.171Z (3 months ago)
- Topics: github-pages, jekyll, markdown, mermaid, mermaidjs
- Language: HTML
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
While GitHub supports Mermaid natively in their own Markdown previews,
the default GitHub Pages action (which uses Jekyll) does not render Mermaid blocks.This small repo shows how to configure the used Jekyll layout to render Mermaid diagrams.
The script gets triggered if `language-mermaid` appears in the output,
which is the class name Jekyll uses for rendered Mermaid code blocks.The Mermaid module is loaded via JSDelivr with subresource integrity in place.
This is achieved by preloading the module with the hash stated (unless you use an old browser).