From ae27b89f5b7e0f040a8df7f9cdcb995a450bf6e8 Mon Sep 17 00:00:00 2001 From: Talut Salako Date: Fri, 18 Oct 2024 14:40:23 +0100 Subject: [PATCH] add neccessary code snippets --- layouts/_default/baseof.html | 6 ++++++ layouts/_default/markup/render-codeblock-mermaid.html | 4 ++++ 2 files changed, 10 insertions(+) create mode 100644 layouts/_default/markup/render-codeblock-mermaid.html diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 1c3add0..13171ea 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -46,6 +46,12 @@ {{- end }} {{- partial "mathjax.html" . -}} +{{ if .Page.Store.Get "hasMermaid" }} + +{{ end }} {{- if templates.Exists "partials/extra-foot.html" -}}{{- partial "extra-foot.html" . -}}{{- end }} diff --git a/layouts/_default/markup/render-codeblock-mermaid.html b/layouts/_default/markup/render-codeblock-mermaid.html new file mode 100644 index 0000000..94ea0ca --- /dev/null +++ b/layouts/_default/markup/render-codeblock-mermaid.html @@ -0,0 +1,4 @@ +
+  {{- .Inner | safeHTML }}
+
+{{ .Page.Store.Set "hasMermaid" true }}