Skip to content

Commit

Permalink
hugolib: Fix .Sections vs siblings
Browse files Browse the repository at this point in the history
Fixes #6365
  • Loading branch information
bep committed Nov 26, 2019
1 parent 96f0965 commit da53523
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 0 additions & 2 deletions hugolib/pages_map.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,6 @@ func (m *pagesMap) addPage(p *pageState) {
}

bucket = v.(*pagesMapBucket)
p.bucket = bucket

bucket.pages = append(bucket.pages, p)
}

Expand Down
2 changes: 2 additions & 0 deletions hugolib/site_sections_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,8 @@ PAG|{{ .Title }}|{{ $sect.InSection . }}
rootPage := s.getPage(page.KindPage, "mypage.md")
c.Assert(rootPage, qt.Not(qt.IsNil))
c.Assert(rootPage.Parent().IsHome(), qt.Equals, true)
// https://github.com/gohugoio/hugo/issues/6365
c.Assert(rootPage.Sections(), qt.HasLen, 0)

// Add a odd test for this as this looks a little bit off, but I'm not in the mood
// to think too hard a out this right now. It works, but people will have to spell
Expand Down

0 comments on commit da53523

Please sign in to comment.