feat: support mermaid codeblocks (#485)

This commit is contained in:
Robert Kaussow 2022-08-29 21:52:44 +02:00 committed by GitHub
parent 53ab130467
commit 12c81554ac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 48 additions and 3 deletions

View file

@ -0,0 +1,11 @@
<!-- prettier-ignore-start -->
{{ if not (.Page.Scratch.Get "mermaid") }}
<!-- Include mermaid only first time -->
<script defer src="{{ index (index .Site.Data.assets "mermaid.js") "src" | relURL }}"></script>
{{ .Page.Scratch.Set "mermaid" true }}
{{ end }}
<!-- prettier-ignore-end -->
<pre class="gdoc-mermaid mermaid">
{{- .Inner -}}
</pre>