Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dzello/reveal-hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Genest <david.genest@gmail.com>2022-11-07 23:46:49 +0300
committerDavid Genest <david.genest@gmail.com>2022-11-07 23:46:49 +0300
commitd5b2aae94fe93cfb0f5487107cfd21c891be8224 (patch)
treeb50da95b981cfe1efca43dc8eae9e9a45014c356
parentfc0f15edaf7dfd21e0dda404b7a36d0cc901360a (diff)
uses .AllPages to evaluate if mermaid is present
Simple sites can be solely defined in the root branch bundle _index.md and contain mermaid content, but the mermaid activation iteration was not considering this type of layout. Using AllPages will iterate on all pages (including translated pages) and properly detect that a root branch bundle has mermaid content.
-rw-r--r--layouts/partials/layout/javascript.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/layouts/partials/layout/javascript.html b/layouts/partials/layout/javascript.html
index 70f4c8b..a5d9981 100644
--- a/layouts/partials/layout/javascript.html
+++ b/layouts/partials/layout/javascript.html
@@ -64,7 +64,7 @@
manage hot-reload by using the reveal ready event.
*/}}
{{ $hasMermaid := false }}
-{{ range .Site.RegularPages }}
+{{ range .Site.AllPages }}
{{ if .Store.Get "hasMermaid" }}
{{ $hasMermaid = true }}
{{ end }}