Adjust the default paginator for sections
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sat, 17 Aug 2019 11:08:03 +0000 (13:08 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sat, 17 Aug 2019 11:08:03 +0000 (13:08 +0200)
To make it in line with 0.56 for sections; only paginate regular pages.

Fixes #6231

hugolib/page__paginator.go

index 20476ecfa93375cdfcdd5e0c86aed2b0a0d34cd7..640a88c4784c3e06dbd632fd53c723a2750803b0 100644 (file)
@@ -88,7 +88,7 @@ func (p *pagePaginator) Paginator(options ...interface{}) (*page.Pager, error) {
                        // changing in the wild, we make this a special case.
                        pages = p.source.s.RegularPages()
                } else {
-                       pages = p.source.Pages()
+                       pages = p.source.RegularPages()
                }
                paginator, err := page.Paginate(pd, pages, pagerSize)
                if err != nil {