{{ define "main" }}
{{ if $.Site.Params.showprofile }} {{ partial "profile.html" . }} {{ end }}
{{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }} {{ $paginator := .Paginate ($pages) }} {{ range $paginator.Pages }} {{ if eq .Type "memo" }} {{ partial "memo.html" . }} {{ else }} {{ partial "post.html" . }} {{ end }} {{ end }}
{{ $paginator := .Paginate (where .Pages "Type" "posts") }} {{partial "pagination.html" .}}
{{ end }}