hugolib: Fix PrevInSection/NextInSection for nested sections

This was broken in Hugo 0.55.0.

Fixes #5883
This commit is contained in:
Bjørn Erik Pedersen
2019-05-01 17:51:03 +02:00
parent 009076e5ee
commit bcbed4ebda
2 changed files with 46 additions and 1 deletions

View File

@@ -220,7 +220,7 @@ func (s *Site) prepareInits() {
if p1.IsPage() && p1.Section() == "" {
rootSection = append(rootSection, i)
}
if p1.IsSection() && len(p1.SectionsEntries()) <= 1 {
if p1.IsSection() {
sectionPages := p1.Pages()
for i, p2 := range sectionPages {
p2s := p2.(*pageState)