{{ define "main" }} {{/* get all the pages that are regular posts and not pages */}} {{ $postsDir := .Site.Params.Posts | default (slice "posts" "post") }} {{ $allPostsList := where .Site.RegularPages "Section" "in" $postsDir }} {{ $featuredPostsList := slice }} {{ $postsList := $allPostsList }} {{ if .Site.Params.enableFeatured | default false }} {{ $featuredPostsList = where $allPostsList "Params.featured" true }} {{ $postsList = union (where $allPostsList "Params.featured" false) (where $allPostsList "Params.featured" nil) }} {{ end }} {{/* pagination */}}
{{ range (.Paginate $postsList).Pages }}

{{ .Title }}

{{ .Date.Format "2006-01-02" }} {{ if .Params.tags }} | {{ range .Params.tags }} #{{ . }} {{ end }} {{ end }}

{{ if .Site.Params.imageInArticlePreview }} {{ if .Params.Image }} {{ end }} {{end}}

{{ .Summary }}

Continue reading 


{{ end }}
{{- partial "paginator.html" . -}} {{ end }}