diff --git a/layouts/_default/_markup/render-codeblock-mermaid.html b/layouts/_default/_markup/render-codeblock-mermaid.html new file mode 100644 index 0000000..42e8abf --- /dev/null +++ b/layouts/_default/_markup/render-codeblock-mermaid.html @@ -0,0 +1,4 @@ +
+  {{ .Inner | htmlEscape | safeHTML }}
+
+{{ .Page.Store.Set "hasMermaid" true }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 5f300bf..0e8d980 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -39,6 +39,7 @@ {{ partialCached "footer/footer" . }} {{ partialCached "article/components/photoswipe" . }} + {{ partialCached "article/components/mermaid" . }} {{ end }} {{ define "right-sidebar" }} diff --git a/layouts/partials/article/components/mermaid.html b/layouts/partials/article/components/mermaid.html new file mode 100644 index 0000000..826e2f0 --- /dev/null +++ b/layouts/partials/article/components/mermaid.html @@ -0,0 +1,9 @@ +{{ if .Store.Get "hasMermaid" }} + +{{ end }} \ No newline at end of file