{{ $title := .Title }} {{ $title = singularize $title }} {{ $title = i18n $title }} {{ if not $title }} {{ $title = .Title }} {{ end }} {{ $what := "none" }} {{ $img := "none" }} {{ if eq .Kind "home" }} {{ $what = "home" }} {{ else }} {{ with .File }} {{ $what = .File.ContentBaseName }} {{ end }} {{ end }} {{ $banner := printf "/images/banner/%s*" $what }} {{ if resources.GetMatch $banner }} {{ $img = resources.GetMatch $banner }} {{ end }} {{ if resources.GetMatch $banner }}