mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-12 16:15:12 +00:00
feat: gallery detection in v2 block system
This commit is contained in:
1 parent
b60ae7e07c
commit
58b270a3e1
2 files changed
+4
-1
No files matched your search
@@ -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 }}
|
||||
|
||||
@@ -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 "*" }}
|
||||
|
||||
Reference in new issue
Block a user