From d4e86b557bf036ed19180653af80a55d51245c9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Lemaitre?= Date: Sat, 18 Nov 2023 23:56:46 +0100 Subject: [PATCH] Integrate mermaid --- .../_markup/render-codeblock-mermaid.html | 4 +++ layouts/partials/javascript.html | 25 +++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 layouts/_default/_markup/render-codeblock-mermaid.html diff --git a/layouts/_default/_markup/render-codeblock-mermaid.html b/layouts/_default/_markup/render-codeblock-mermaid.html new file mode 100644 index 0000000..bb7bf42 --- /dev/null +++ b/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/layouts/partials/javascript.html b/layouts/partials/javascript.html index 69ccb82..3616997 100644 --- a/layouts/partials/javascript.html +++ b/layouts/partials/javascript.html @@ -9,3 +9,28 @@ {{ end }} {{ end }} +{{ if .Page.Store.Get "hasMermaid" }} + +{{ end }} \ No newline at end of file