Determine if current page is result of pagination

this was also a fight for me in the last 2 weeks…

Every page in paging should have different titles and descriptions, got this from an verifier back.

@bep
Can we have a .GetPager as page function? Give back null/nil if no pager is there.

here my changed list.html with page numbers, if anyone need it - must change the classes

{{ define "main" }}
<header>
	{{ $pages := site.GetPage .Section }}	{{ $paginator := .Paginate $pages.Pages 20}}
	<h1><span>{{ site.Title | markdownify }}</span><i class="ph3 fas fa-dragon fa-fw"></i>{{ .Page.Title }} {{ $paginator.PageNumber }}</h1>
	{{if isset .Params "description" }}<div class="f5 b w-90-ns pb1">{{ .Description }} {{ $paginator.PageNumber }}</div>{{end}}
</header>	
	<h2 class=dn>{{ .Page.Title }}</h2>
	<article>
		<div class=liste>
			{{ range $paginator.Pages -}}
			{{ .Render "summary" }}
			{{- end }}
		</div>
		{{ partial "pagination" . }}
	</article>
{{ end }}
2 Likes