Paginating sections

I’d like to know if the following is possible:

I have many sections, and I’d like to paginate groups of sections. For example, if I have a section for every year, I would like to group the sections by decade.

So far, my investigation has come up short. .Paginate (.Data.Pages.GroupBy “Section”) can paginate by the year, but what I’m hoping to achieve is to essentially group by decade.

Thanks,

Andy

Not sure what you mean by “section” here … But considering your content has a date, you can group by some date pattern:

{{ range .Data.Pages.GroupByDate "2006-01" }}

The above will group by month, changing the format string should give you different groups “2006” == year, not sure aobut decade … “06” maybe?