{{ define "hero" }} {{ partial "hero.html" . }} {{ end }} {{ define "main" }}
{{ range $index, $element := (where .Pages "Type" "in" .Site.Params.mainSections).ByWeight }}

{{ .Title }}

{{ range first 3 .Pages.ByPublishDate.Reverse }} {{ partial "post.html" . }} {{ end }}
{{ end }} {{ end }}