Skip to content

Commit 5cbdd54

Browse files
committed
docs: enable mermaid diagram rendering on front page
1 parent 671320e commit 5cbdd54

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

mkdocs.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@ markdown_extensions:
5353
anchor_linenums: true
5454
- pymdownx.inlinehilite
5555
- pymdownx.snippets
56-
- pymdownx.superfences
56+
- pymdownx.superfences:
57+
custom_fences:
58+
- name: mermaid
59+
class: mermaid
60+
format: !!python/name:pymdownx.superfences.fence_code_format
5761
- pymdownx.tabbed:
5862
alternate_style: true
5963
- pymdownx.tasklist:
@@ -67,3 +71,7 @@ plugins:
6771
enable_creation_date: true
6872
- minify:
6973
minify_html: true
74+
75+
extra_javascript:
76+
- https://unpkg.com/mermaid@11.4.1/dist/mermaid.min.js
77+
- assets/javascripts/mermaid-init.js
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
document$.subscribe(function () {
2+
mermaid.initialize({ startOnLoad: false, theme: "default" });
3+
mermaid.run({ querySelector: ".mermaid" });
4+
});

0 commit comments

Comments
 (0)