{{- $src := .Get "src" -}} {{- $link := .Get "link" -}} {{- $target := .Get "target" -}} {{- if not $link -}}{{- $link = $src -}}{{- end -}} {{- if not $target -}}{{- $target = "_blank" -}}{{- end -}} {{ with .Get {{- if or (or (.Get "title") (.Get "caption")) (.Get "attr") -}} {{ with (.Get "title") -}} {{ . }} {{- end -}} {{- if or (.Get "caption") (.Get "attr") -}}

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

{{- end }}
{{- end }}