{{ define "main" }} {{ if or (eq .Section "post") (eq .Section "posts") (eq .Section "blog") (eq .Section "blogs") (eq .Section "categories") (eq .Section "tags") }}

{{ site.Params.showing_posts }} {{ .Title | markdownify | title }}

{{ $paginator:= .Paginate (where .Data.Pages "Section" "in" site.Params.mainSections ) }} {{ range $paginator.Pages }}
{{ .Render "post" }}
{{ end }}
{{ $paginator := .Paginator }} {{ $adjacent_links := 2 }} {{ $max_links := (add (mul $adjacent_links 2) 1) }} {{ $lower_limit := (add $adjacent_links 1) }} {{ $upper_limit := (sub $paginator.TotalPages $adjacent_links) }} {{ if gt $paginator.TotalPages 1 }} {{ end }}
{{else}}
{{.Content}}
{{end}} {{ end }}