{{ define "main" }}
<h1>{{ .Title }}</h1>
{{ .Content }}

{{ $paginationSize := 1}}
{{ if (gt .Site.Params.paginationSize 0) }}
{{ $paginationSize = .Site.Params.paginationSize }}
{{ end }}

{{ $paginator := .Paginate (.Pages) $paginationSize }}

{{ range $index, $page := $paginator.Pages }}
{{ partial "post-entry.html" $page}}
{{ end }}

{{ partial "pagination-controls.html" $paginator}}

{{ end }}