diff --git a/themes/lhs/layouts/_default/_markup/render-codeblock-mermaid.html b/themes/lhs/layouts/_default/_markup/render-codeblock-mermaid.html new file mode 100644 index 0000000..c34170e --- /dev/null +++ b/themes/lhs/layouts/_default/_markup/render-codeblock-mermaid.html @@ -0,0 +1,4 @@ +
+ {{- .Inner | safeHTML }}
+
+ {{ .Page.Store.Set "hasMermaid" true }}
\ No newline at end of file
diff --git a/themes/lhs/layouts/partials/foot.html b/themes/lhs/layouts/partials/foot.html
index 690dc04..5188ae2 100644
--- a/themes/lhs/layouts/partials/foot.html
+++ b/themes/lhs/layouts/partials/foot.html
@@ -1,6 +1,13 @@
+{{ if .Page.Store.Get "hasMermaid" }}
+
+{{ end }}
+
{{ $theme := resources.Get "js/theme.js" }}
{{ $site := resources.Get "js/site.js" }}
{{ $js := slice $site $theme | resources.Concat "js/bundle.js" | resources.Minify }}