{{ define "main"}}
Perhaps you were looking for one of these?
{{ $query := where (where (where (where site.RegularPages.ByDate.Reverse "Title" "!=" "") "Kind" "in" (slice "page" "section")) "Params.private" "!=" true) "Permalink" "!=" "" }} {{ $count := len $query }} {{ if gt $count 0 }} {{ range first 5 $query }} {{ partial "post.html" . }} {{ end }} {{ end }}