Possible to reuse a headless bundle image by naming it in a front matter variable and matching the name with .Resources.GetMatch? Seems like it ought to be. There is something wrong with my syntax here?
{{with .Params.featureImage}}
{{$match := . }}
{{with .Site.GetPage "section" "headless"}}
{{with .Resources.GetMatch $match }}
{{$featureImage = ( . ).Permalink }}
{{end}}
{{end}}
{{end}}
$featureImage is defined earlier in the partial. Params.featureImage is the name of the image in content/headless/, which is set headless = true
+++
featureImage = "mountains.jpg"
+++
$match is defined in the block. The error is
render of “section” failed: at <.Site.GetPage>: can’t evaluate field Site in type string