{{ define "main" }}

{{ .Title }}

{{ $textContent := .Content }} {{ with .Resources.GetMatch "image.jpg" }}
{{ $textContent }}
{{ .Title }}
{{ else }} {{ .Content }} {{ end }} {{ end }}