hugo

Unnamed repository; edit this file 'description' to name the repository.

git clone git://git.shimmy1996.com/hugo.git
commit 72bda5ad268866e02bfab7ccf76d9224db6ec7b6
parent 8fe48a657642c4fc9855a62e9517509b10b0cbbd
Author: nitoyon <nitoyon@gmail.com>
Date:   Wed, 28 Oct 2015 01:55:57 +0900

Move section initialization to Site.assembleSections

Closes #1527

Diffstat:
Mhugolib/site.go | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)
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)
 	}