From a8028822e80c570a98d2a7734c62c30b393ab6d3 Mon Sep 17 00:00:00 2001 From: peaceiris <30958501+peaceiris@users.noreply.github.com> Date: Wed, 14 Oct 2020 19:08:39 +0900 Subject: [PATCH] feat: check .HasShortcode mermaid --- exampleSite/content/en/posts/mathjax.md | 1 - exampleSite/content/en/posts/mermaid.md | 1 - layouts/_default/baseof.html | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/exampleSite/content/en/posts/mathjax.md b/exampleSite/content/en/posts/mathjax.md index 8ee3f5c17..bf72fe529 100644 --- a/exampleSite/content/en/posts/mathjax.md +++ b/exampleSite/content/en/posts/mathjax.md @@ -7,7 +7,6 @@ publishdate: 2020-01-01T01:00:00.000Z # tags: ["hugo"] toc: true math: true -# mermaid: true # weight: 1 twitter: username: piris314 diff --git a/exampleSite/content/en/posts/mermaid.md b/exampleSite/content/en/posts/mermaid.md index 28b9b4e55..ab1072a8b 100644 --- a/exampleSite/content/en/posts/mermaid.md +++ b/exampleSite/content/en/posts/mermaid.md @@ -7,7 +7,6 @@ publishdate: 2020-01-02T01:00:00.000Z # tags: ["hugo"] toc: true # math: true -mermaid: true # weight: 1 twitter: username: piris314 diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index b3a598ff5..a8e20fc4b 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -32,7 +32,7 @@ {{ with $.Params.math }} {{ partialCached "mathjax" . }} {{ end }} - {{ with $.Params.mermaid }} + {{ with .HasShortcode "mermaid" }} {{ partialCached "mermaid" . }} {{ end }}