ref: da53523599b43261520a22d77019b390aaa072e7
parent: 96f09659ce8752c32a2a6429c9faf23be4faa091
author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
date: Tue Nov 26 08:12:44 EST 2019
hugolib: Fix .Sections vs siblings Fixes #6365
--- a/hugolib/pages_map.go
+++ b/hugolib/pages_map.go
@@ -176,8 +176,6 @@
}
bucket = v.(*pagesMapBucket)
- p.bucket = bucket
-
bucket.pages = append(bucket.pages, p)
}
--- a/hugolib/site_sections_test.go
+++ b/hugolib/site_sections_test.go
@@ -321,6 +321,8 @@
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