diff --git a/modules/wowchemy/layouts/partials/site_head.html b/modules/wowchemy/layouts/partials/site_head.html index 1c4521b0..6ddeb2e7 100644 --- a/modules/wowchemy/layouts/partials/site_head.html +++ b/modules/wowchemy/layouts/partials/site_head.html @@ -91,7 +91,7 @@ {{ end }} {{ else }} {{/* Single page */}} - {{ if .HasShortcode "gallery" }} + {{ if .HasShortcode "gallery" | or ($.Page.Store.Get "has_gallery") }} {{ $has_gallery = true }} {{ end }} {{ end }} diff --git a/modules/wowchemy/layouts/shortcodes/gallery.html b/modules/wowchemy/layouts/shortcodes/gallery.html index b1a55f13..83139031 100644 --- a/modules/wowchemy/layouts/shortcodes/gallery.html +++ b/modules/wowchemy/layouts/shortcodes/gallery.html @@ -15,6 +15,9 @@ Resize options passed to Hugo `.Fit` function (https://gohugo.io/content-management/image-processing/). */}} +{{/* For gallery nested in landing page sections */}} +{{ $.Page.Store.Set "has_gallery" true }} + {{/* Get album folder or default to `media/albums/gallery/`. */}} {{ $album := (.Get "album") | default "gallery" }} {{ $album_path := path.Join "media" "albums" $album "*" }}