Template functions · Pages
pages
Links for a paginated listing.
pages .SourceReturns one entry per page with .Path, .Page (the number) and .Active. The list is empty when everything fits on one page, so the loop renders nothing.
Example
{{ range pages .Source }}
<a href="{{.Path}}"{{ if .Active }} aria-current="page"{{ end }}>{{ .Page }}</a>
{{ end }}Other functions
data
sources
sort
filter
limit
offset
select
paginate
page
path
hash
json
contains
html
js
css