From 35a605976ecc110e21af4ae4eae8d92768249197 Mon Sep 17 00:00:00 2001 From: spf13 Date: Wed, 28 May 2014 19:11:54 -0400 Subject: [PATCH] SiteInfo is now a pointer on the Node --- hugolib/node.go | 2 +- hugolib/page_permalink_test.go | 2 +- hugolib/site.go | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hugolib/node.go b/hugolib/node.go index e7e524da2..2ff8d40cd 100644 --- a/hugolib/node.go +++ b/hugolib/node.go @@ -20,7 +20,7 @@ import ( type Node struct { RSSLink template.HTML - Site SiteInfo + Site *SiteInfo // layout string Data map[string]interface{} Title string diff --git a/hugolib/page_permalink_test.go b/hugolib/page_permalink_test.go index 5bbf07da8..51306fade 100644 --- a/hugolib/page_permalink_test.go +++ b/hugolib/page_permalink_test.go @@ -41,7 +41,7 @@ func TestPermalink(t *testing.T) { Section: "z", Url: test.url, }, - Site: SiteInfo{ + Site: &SiteInfo{ BaseUrl: test.base, }, }, diff --git a/hugolib/site.go b/hugolib/site.go index 54f90b392..7a0e69fde 100644 --- a/hugolib/site.go +++ b/hugolib/site.go @@ -330,7 +330,7 @@ func (s *Site) CreatePages() (err error) { if err != nil { return err } - page.Site = s.Info + page.Site = &s.Info page.Tmpl = s.Tmpl page.Section = file.Section page.Dir = file.Dir @@ -760,7 +760,7 @@ func (s *Site) RenderSitemap() error { page := &Page{} page.Date = s.Info.LastChange - page.Site = s.Info + page.Site = &s.Info page.Url = "/" pages = append(pages, page) @@ -833,7 +833,7 @@ func (s *Site) PrettifyPath(in string) string { func (s *Site) NewNode() *Node { return &Node{ Data: make(map[string]interface{}), - Site: s.Info, + Site: &s.Info, } }