hugo

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

git clone git://git.shimmy1996.com/hugo.git
commit d89c7ec7a2fc198b92c63a1103932dff18cb37c1
parent 42de9bd8bb08ea944cb6258503fd6e5eb5198d4f
Author: Steve Francia <steve.francia@gmail.com>
Date:   Wed,  7 Aug 2013 14:05:07 -0700

Merge pull request #19 from nsabine/master

Populated page Site metadata.  Enables accessing Indexes from Page template.
Diffstat:
Mhugolib/site.go | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/hugolib/site.go b/hugolib/site.go
@@ -271,6 +271,12 @@ func (s *Site) BuildSiteMeta() (err error) {
 		return errors.New(fmt.Sprintf("Unable to build site metadata, no pages found in directory %s", s.c.ContentDir))
 	}
 	s.Info.LastChange = s.Pages[0].Date
+
+	// populate pages with site metadata
+	for _, p := range s.Pages {
+		p.Site = s.Info
+	}
+
 	return
 }