From c4f6e3fd321ed2de338f89806ea2a79ddcca00b9 Mon Sep 17 00:00:00 2001 From: Emiel Hollander Date: Sun, 14 Oct 2018 10:08:30 +0200 Subject: [PATCH 1/4] Use Hugo page resources to create thumbnails and gallery --- layouts/shortcodes/gallery.html | 50 ++++++++++++--------------------- 1 file changed, 18 insertions(+), 32 deletions(-) diff --git a/layouts/shortcodes/gallery.html b/layouts/shortcodes/gallery.html index aac2ace..b9eb593 100644 --- a/layouts/shortcodes/gallery.html +++ b/layouts/shortcodes/gallery.html @@ -3,39 +3,25 @@ Documentation and licence at https://github.com/liwenyip/hugo-easy-gallery/ --> -{{- if not ($.Page.Scratch.Get "figurecount") }}{{ end }} -{{- $.Page.Scratch.Add "figurecount" 1 }} -{{ $baseURL := .Site.BaseURL }} +{{- if not ($.Page.Scratch.Get "figurecount") -}}{{- end -}} +{{- $.Page.Scratch.Add "figurecount" 1 -}} +{{- $baseURL := .Site.BaseURL -}}