{{ $original := .Page.Resources.GetMatch (printf "*%s*" (.Get 0)) }} {{ $imgdata := imageConfig (printf "/content/%s" $original.RelPermalink) }} {{ if (gt $imgdata.Width 1500) }} {{ .Scratch.Set "image" ($original.Resize "1500x") }} {{ else if (gt $imgdata.Height 1500) }} {{ .Scratch.Set "image" ($original.Resize "x1500") }} {{ else }} {{ .Scratch.Set "image" $original }} {{ end }} {{ $image := .Scratch.Get "image" }}
{{ .Inner | markdownify }}