mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-27 22:09:53 +02:00
hugolib: Fix 2 Paginator.Pages taxonomy regressions
Fixes #6921 Fixes #6918
This commit is contained in:
@@ -82,14 +82,19 @@ func (p *pagePaginator) Paginator(options ...interface{}) (*page.Pager, error) {
|
||||
pd.Type = p.source.outputFormat()
|
||||
|
||||
var pages page.Pages
|
||||
if p.source.IsHome() {
|
||||
|
||||
switch p.source.Kind() {
|
||||
case page.KindHome:
|
||||
// From Hugo 0.57 we made home.Pages() work like any other
|
||||
// section. To avoid the default paginators for the home page
|
||||
// changing in the wild, we make this a special case.
|
||||
pages = p.source.s.RegularPages()
|
||||
} else {
|
||||
case page.KindTaxonomy, page.KindTaxonomyTerm:
|
||||
pages = p.source.Pages()
|
||||
default:
|
||||
pages = p.source.RegularPages()
|
||||
}
|
||||
|
||||
paginator, err := page.Paginate(pd, pages, pagerSize)
|
||||
if err != nil {
|
||||
initErr = err
|
||||
|
Reference in New Issue
Block a user