diff --git a/layouts/shortcodes/figure.html b/layouts/shortcodes/figure.html index 555f6bf9..c2e42cd8 100644 --- a/layouts/shortcodes/figure.html +++ b/layouts/shortcodes/figure.html @@ -10,10 +10,15 @@ {{- $thumb := .Get "src" | default (printf "%s." (.Get "thumb") | replace (.Get "link") ".") }}
-
- +
+ {{ $altText := .Get "caption" | default (.Get "alt") | default $thumb }} + {{ with $.Page.Resources.GetMatch $thumb }} + {{$altText}} + {{ end }}
- {{ with .Get "link" | default (.Get "src") }}{{ end }} + {{ with $.Page.Resources.GetMatch (.Get "link") }} + + {{ end }} {{- if or (or (.Get "title") (.Get "caption")) (.Get "attr")}}
{{- with .Get "title" }}

{{.}}

{{ end }}