From 5cded97fd0815280cc787f88f49ddc21abd3b576 Mon Sep 17 00:00:00 2001 From: "Patty R." Date: Mon, 17 Jun 2024 20:57:24 -0700 Subject: [PATCH] feat: added mermaid support source: https://navendu.me/posts/adding-diagrams-to-your-hugo-blog-with-mermaid/ --- layouts/partials/article/components/footer.html | 5 +++++ layouts/partials/mermaid.html | 12 ++++++++++++ layouts/shortcodes/mermaid.html | 1 + 3 files changed, 18 insertions(+) create mode 100644 layouts/partials/mermaid.html create mode 100644 layouts/shortcodes/mermaid.html diff --git a/layouts/partials/article/components/footer.html b/layouts/partials/article/components/footer.html index 6853921..e6ccf75 100644 --- a/layouts/partials/article/components/footer.html +++ b/layouts/partials/article/components/footer.html @@ -16,4 +16,9 @@ {{- end -}} + + + {{ if (.Params.mermaid) }} + {{ partial "mermaid.html" }} + {{ end }} diff --git a/layouts/partials/mermaid.html b/layouts/partials/mermaid.html new file mode 100644 index 0000000..a09805a --- /dev/null +++ b/layouts/partials/mermaid.html @@ -0,0 +1,12 @@ + + \ No newline at end of file diff --git a/layouts/shortcodes/mermaid.html b/layouts/shortcodes/mermaid.html new file mode 100644 index 0000000..ca78f87 --- /dev/null +++ b/layouts/shortcodes/mermaid.html @@ -0,0 +1 @@ +
{{.Inner}}
\ No newline at end of file