{{ $original := .Page.Resources.GetMatch (printf "*%s*" (.Get 0)) }} {{ $command := strings.ToLower (printf "%s" (.Get 1)) }} {{ $options := .Get 2 }} {{ if eq $command "fit"}} {{ .Scratch.Set "image" ($original.Fit $options) }} {{ else if eq $command "resize"}} {{ .Scratch.Set "image" ($original.Resize $options) }} {{ else if eq $command "fill"}} {{ .Scratch.Set "image" ($original.Fill $options) }} {{ else }} {{ errorf "Invalid image processing command: Must be one of Fit, Fill or Resize. Is: %s" ($command)}} {{ end }} {{ $image := .Scratch.Get "image" }}
{{ with not .Inner }} {{ $original.Title }} {{ end }}