From e89317934f95b095d3380ffe9e1ccd2483c312c8 Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Sat, 27 Jan 2024 17:47:26 +0000 Subject: [PATCH] Add Mermaid support --- .../layouts/_default/_markup/render-codeblock-mermaid.html | 4 ++++ themes/lhs/layouts/partials/foot.html | 7 +++++++ 2 files changed, 11 insertions(+) create mode 100644 themes/lhs/layouts/_default/_markup/render-codeblock-mermaid.html 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 }}