From 98ee41b0fbf3fb90a1d0701152777fc00116f977 Mon Sep 17 00:00:00 2001 From: James Ray Date: Sun, 6 Mar 2022 13:24:20 -0500 Subject: [PATCH] add optional mermaid shotcode --- layouts/_default/baseof.html | 3 +++ layouts/partials/mermaid.html | 2 ++ layouts/shortcodes/mermaid.html | 2 ++ 3 files changed, 7 insertions(+) create mode 100644 layouts/partials/mermaid.html create mode 100644 layouts/shortcodes/mermaid.html diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index af3faed..d9ea68b 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -5,6 +5,9 @@ {{- partial "header.html" . -}} {{ template "_internal/opengraph.html" . }} + {{ if site.Params.features.mermaid.enabled}} + {{ partial "mermaid.html" . }} + {{ end }} {{ block "header" . }} {{ end }} diff --git a/layouts/partials/mermaid.html b/layouts/partials/mermaid.html new file mode 100644 index 0000000..6f60a70 --- /dev/null +++ b/layouts/partials/mermaid.html @@ -0,0 +1,2 @@ + + diff --git a/layouts/shortcodes/mermaid.html b/layouts/shortcodes/mermaid.html new file mode 100644 index 0000000..287bc38 --- /dev/null +++ b/layouts/shortcodes/mermaid.html @@ -0,0 +1,2 @@ +{{ $_hugo_config := `{ "version": 1 }` }} +
{{ safeHTML .Inner }}