diff --git a/layouts/shortcodes/figure.html b/layouts/shortcodes/figure.html index edf542a..555f6bf 100644 --- a/layouts/shortcodes/figure.html +++ b/layouts/shortcodes/figure.html @@ -4,7 +4,7 @@ NB this overrides Hugo's built-in "figure" shortcode but is backwards compatible Documentation and licence at https://github.com/liwenyip/hugo-easy-gallery/ --> -{{- if not ($.Page.Scratch.Get "figurecount") }}{{ end }} +{{- if not ($.Page.Scratch.Get "figurecount") }}{{ end }} {{- $.Page.Scratch.Add "figurecount" 1 -}} {{- $thumb := .Get "src" | default (printf "%s." (.Get "thumb") | replace (.Get "link") ".") }} diff --git a/layouts/shortcodes/gallery.html b/layouts/shortcodes/gallery.html index aac2ace..25448de 100644 --- a/layouts/shortcodes/gallery.html +++ b/layouts/shortcodes/gallery.html @@ -3,7 +3,7 @@ Put this file in /layouts/shortcodes/gallery.html Documentation and licence at https://github.com/liwenyip/hugo-easy-gallery/ --> -{{- if not ($.Page.Scratch.Get "figurecount") }}{{ end }} +{{- if not ($.Page.Scratch.Get "figurecount") }}{{ end }} {{- $.Page.Scratch.Add "figurecount" 1 }} {{ $baseURL := .Site.BaseURL }}