{{- if .Get "single" -}}
{{ end }}
{{- if .Get "link" -}} {{- end -}} {{ $options := or (.Get "options") "500x500 center" }} {{ $permalink := "" }} {{ if hasPrefix (.Get "src") "https://" }} {{ $permalink = .Get "src" }} {{ else }} {{ $resource := .Page.Resources.GetMatch (.Get "src") }} {{ if not $resource }} {{ $resource = .Page.Parent.Resources.GetMatch (.Get "src") }} {{- end -}} {{ if $resource }} {{ $permalink = ($resource.Fill $options).Permalink }} {{- end -}} {{- end -}} {{ with .Get {{- 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 }}
{{- if .Get "single" -}}
{{ end }}