{{- $pages := site.RegularPages }} {{- with site.Params.hb.blog.home.main_sections }} {{- $pages = where $pages "Section" "in" . }} {{- end }} {{- $pinnedPos := default "" site.Params.hb.blog.home.pinned_posts_position }} {{- $featuredCount := default 10 site.Params.hb.blog.home.featured_posts }} {{- $featuredPages := first $featuredCount (where $pages ".Params.featured" true) }} {{- if $featuredPages }}