Move section initialization to Site.assembleSections - hugo - [fork] hugo port for 9front
HTML git clone git@git.drkhsh.at/hugo.git
DIR Log
DIR Files
DIR Refs
DIR Submodules
DIR README
DIR LICENSE
---
DIR commit 72bda5ad268866e02bfab7ccf76d9224db6ec7b6
DIR parent 8fe48a657642c4fc9855a62e9517509b10b0cbbd
HTML Author: nitoyon <nitoyon@gmail.com>
Date: Wed, 28 Oct 2015 01:55:57 +0900
Move section initialization to Site.assembleSections
Closes #1527
Diffstat:
M hugolib/site.go | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
DIR diff --git a/hugolib/site.go b/hugolib/site.go
@@ -1243,7 +1243,6 @@ func (s *Site) assembleMenus() {
func (s *Site) assembleTaxonomies() {
s.Taxonomies = make(TaxonomyList)
- s.Sections = make(Taxonomy)
taxonomies := viper.GetStringMapString("Taxonomies")
jww.INFO.Printf("found taxonomies: %#v\n", taxonomies)
@@ -1276,7 +1275,6 @@ func (s *Site) assembleTaxonomies() {
}
s.Info.Taxonomies = s.Taxonomies
- s.Info.Sections = s.Sections
}
// Prepare pages for a new full build.
@@ -1291,6 +1289,9 @@ func (s *Site) resetPageBuildState() {
}
func (s *Site) assembleSections() {
+ s.Sections = make(Taxonomy)
+ s.Info.Sections = s.Sections
+
for i, p := range s.Pages {
s.Sections.add(p.Section(), WeightedPage{s.Pages[i].Weight, s.Pages[i]}, s.Info.preserveTaxonomyNames)
}