mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-03 01:13:46 -05:00
702 B
702 B
title | description | categories | keywords | action | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
PageGroups | Returns the page groups in the current pager. |
|
Use the PageGroups
method with any of the grouping methods.
{{ $pages := where site.RegularPages "Type" "posts" }}
{{ $paginator := .Paginate ($pages.GroupByDate "Jan 2006") }}
{{ range $paginator.PageGroups }}
<h2>{{ .Key }}</h2>
{{ range .Pages }}
<h3><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h3>
{{ end }}
{{ end }}
{{ template "_internal/pagination.html" . }}