{{ $image := .Get "src" }} {{ if .Get "link"}}{{ end }} {{ if (findRE "(^|:)//" $image) -}} {{- /* Cannot use absURL below because it doesn't work as expected if baseURL has a subdir. */ -}} {{- $baseurl_no_trailing_slash := $.Site.BaseURL | replaceRE "/$" "" -}} \"%s\"" {{- if .Get "link" }}{{ end -}} {{- 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 -}}