You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
763 B
21 lines
763 B
{{ define "main" }}
|
|
|
|
{{ $paginator := .Paginate (where .Site.RegularPages "Type" "ne" "page" | intersect (where .Site.RegularPages "Params.excludefromindex" "==" nil)) (index .Site.Params "paginate" | default 7) }}
|
|
|
|
{{ if .Site.Params.pinnedPost }}
|
|
{{ if (and .Site.Params.pinOnlyToFirstPage (ne $paginator.PageNumber 1)) }}
|
|
{{/* Do nothing if the pinOnlyToFirstPage flag is set and we're not on page 1. */}}
|
|
{{else}}
|
|
{{ range first 1 (where .Data.Pages "URL" .Site.Params.pinnedPost) }}
|
|
{{ partial "article-wrapper" . }}
|
|
{{end}}
|
|
{{end}}
|
|
{{end}}
|
|
|
|
{{ range $paginator.Pages }}
|
|
{{ partial "article-wrapper" . }}
|
|
{{ end }}
|
|
|
|
{{ partial "paginator" . }}
|
|
{{ end }}
|