mirror of
https://github.com/ETLCPP/etl.git
synced 2026-10-28 18:07:10 +08:00
Added mermaid support
This commit is contained in:
parent
2aa0c4edb3
commit
74634a54fb
4
hugo/layouts/_markuprender-codeblock-mermaid.html
Normal file
4
hugo/layouts/_markuprender-codeblock-mermaid.html
Normal file
@ -0,0 +1,4 @@
|
||||
<pre class="mermaid">
|
||||
{{ .Inner | htmlEscape | safeHTML }}
|
||||
</pre>
|
||||
{{ .Page.Store.Set "hasMermaid" true }}
|
||||
6
hugo/layouts/baseof.html
Normal file
6
hugo/layouts/baseof.html
Normal file
@ -0,0 +1,6 @@
|
||||
{{ if .Store.Get "hasMermaid" }}
|
||||
<script type="module">
|
||||
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.esm.min.mjs';
|
||||
mermaid.initialize({ startOnLoad: true });
|
||||
</script>
|
||||
{{ end }}
|
||||
Loading…
x
Reference in New Issue
Block a user