{{/* Enable image to be loaded from local page dir or media library at `static/img/`. */}} {{ $image_src := .Get "src" }} {{ if .Get "library" }} {{ $image_src = printf "img/%s" $image_src | relURL }} {{ end }} {{ $lightbox := eq (.Get "lightbox" | default "false") "true" }} {{ $group := .Get "lightbox-group" | default "" }} {{ if $lightbox }} {{ else if .Get "link"}} {{ end }} {{ if or $lightbox (.Get "link") }}{{ end }} {{ if or (or (.Get "title") (.Get "caption")) (.Get "attr")}} {{ $figure := split (i18n "figure" | default "Figure %d:") "%d" }}
{{ if isset .Params "title" }}

{{ .Get "title" | markdownify | emojify }}

{{ end }} {{ if or (.Get "caption") (.Get "attr")}}

{{ .Get "caption" | markdownify | emojify }} {{ with .Get "attrlink"}} {{ end }} {{ .Get "attr" }} {{ if .Get "attrlink"}} {{ end }}

{{ end }}
{{ end }}