diff --git a/layouts/shortcodes/figure.html b/layouts/shortcodes/figure.html index b8dcbc9..4c6ff1f 100644 --- a/layouts/shortcodes/figure.html +++ b/layouts/shortcodes/figure.html @@ -10,9 +10,10 @@ Documentation and licence at https://github.com/liwenyip/hugo-easy-gallery/ {{- $thumb := .Get "src" | default (printf "%s." (.Get "thumb") | replace (.Get "link") ".") }}
-
+
+ {{ 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 }}