{{- $original := .Page.Resources.GetMatch (printf "*%s*" (.Get 0)) -}} {{- $image := $original -}} {{- $align := "none" -}} {{- $alttext := "" -}} {{- with (.Get 1) -}} {{- if not (eq . "auto") -}} {{- if or (hasSuffix . "x") (hasPrefix . "x") -}} {{ $image = ($image.Resize .) }} {{- else -}} {{ $image = ($image.Fit .) }} {{- end -}} {{- end -}} {{- end -}} {{- with (.Get 2) -}} {{- $align = . -}} {{- end -}} {{- with (.Get 3) -}} {{ $alttext = . -}} {{- end -}} {{- if (gt $image.Width 1500) -}} {{- $image = ($image.Resize "1500x") -}} {{- else if (gt $image.Height 1500) -}} {{- $image = ($image.Resize "x1500") -}} {{- end -}}
{{ $alttext }}
{{ .Inner | markdownify }}