{{ define "main" }} {{ $headless := .Site.GetPage "/homepage" }} {{ $sections := $headless.Resources.ByType "page" }} {{ $sections := cond .Site.BuildDrafts $sections (where $sections "Draft" "==" false) }} {{ with .Params.header_headline }}{{ . | markdownify | safeHTML }}{{ end }} {{ with .Params.header_subheadline }}{{ . }}{{ end }} {{ range where $sections ".Params.header_menu" "eq" true }} {{ end }} {{ range $index_val, $elem_val := $sections }} {{ .Title }} {{ .Content }} {{ end }} {{ end }}