Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-11-26 15:12:44 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-11-26 15:12:44 +0300
commitda53523599b43261520a22d77019b390aaa072e7 (patch)
tree8a1d24b1354331e0f3684daad9478aff86955eac /hugolib
parent96f09659ce8752c32a2a6429c9faf23be4faa091 (diff)
hugolib: Fix .Sections vs siblings
Fixes #6365
Diffstat (limited to 'hugolib')
-rw-r--r--hugolib/pages_map.go2
-rw-r--r--hugolib/site_sections_test.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/hugolib/pages_map.go b/hugolib/pages_map.go
index b5b47ccaf..bc8589142 100644
--- a/hugolib/pages_map.go
+++ b/hugolib/pages_map.go
@@ -176,8 +176,6 @@ func (m *pagesMap) addPage(p *pageState) {
}
bucket = v.(*pagesMapBucket)
- p.bucket = bucket
-
bucket.pages = append(bucket.pages, p)
}
diff --git a/hugolib/site_sections_test.go b/hugolib/site_sections_test.go
index 3cd2a06bb..eba8a4391 100644
--- a/hugolib/site_sections_test.go
+++ b/hugolib/site_sections_test.go
@@ -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