+ {{ with .Get "link" | default (.Get "src") }}{{ end }}
{{- if or (or (.Get "title") (.Get "caption")) (.Get "attr")}}
{{- with .Get "title" }}
{{.}}
{{ end }}
@@ -24,6 +25,5 @@ Documentation and licence at https://github.com/liwenyip/hugo-easy-gallery/
{{- end }}
{{- end }}
- {{ with .Get "link" | default (.Get "src") }}{{ end }}
-
\ No newline at end of file
+
diff --git a/layouts/shortcodes/gallery.html b/layouts/shortcodes/gallery.html
index bd74f8b..aac2ace 100644
--- a/layouts/shortcodes/gallery.html
+++ b/layouts/shortcodes/gallery.html
@@ -5,6 +5,7 @@ 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 }}