{{ $img := .Get "img" }} {{ $command := .Get "command" }} {{ $options := .Get "options" }} {{ $original := .Page.Resources.GetMatch (printf "*%s*" $img) }} {{ $new := "" }} {{ if eq $command "Fit" }} {{ $new = $original.Fit $options }} {{ else if eq $command "Fill" }} {{ $new = $original.Fill $options }} {{ else if eq $command "Resize" }} {{ $new = $original.Resize $options }} {{ else if eq $command "Original" }} {{ $new = $original }} {{ else }} {{ errorf "Invalid image processing command: Must be one of Fit, Fill, Resize, Original." }} {{ end }}
{{ with (.Get "title" )}}

{{ . | markdownify }}

{{ end }} {{ with (.Get "subtitle" )}}
{{ . | markdownify }}
{{ end }} {{ with (.Get "text") }}

{{ . | markdownify }}

{{ end }}