{{ $pages := .Pages }}
{{ if .IsHome }}
{{ $pages = where site.RegularPages "Type" "in" site.Params.mainSections }}
{{ end }}
{{- if ne .Title "Tags"}}
{{- range (.Paginate $pages).Pages }}
{{- $postDate := .Date.Format "2006-01-02" }}
{{- $updateDate := .Lastmod.Format "2006-01-02" }}
{{ end }}
{{- template "_internal/pagination.html" . }}
{{- else }}
{{- range .Pages.ByTitle }}
[{{ .Title | markdownify }}]
{{- end }}
{{- end }}