{{ define "main" }} {{ $headless := .Site.GetPage "/homepage" }} {{ $sections := $headless.Resources.ByType "page" }} {{ $scratch := newScratch }} {{ $scratch.Set "sections" $sections }} {{ if not .Site.BuildDrafts }} {{ $sections := where $sections "Draft" "!=" true}} {{ $scratch.Set "sections" $sections }} {{ end}} {{ $sections := $scratch.Get "sections" }}
{{ range $index_val, $elem_val := $sections }}

{{ .Title }}

{{ .Content }}
{{ end }}
{{ end }}