shithub: hugo

Download patch

ref: 35a605976ecc110e21af4ae4eae8d92768249197
parent: 7a8b754cada398241fc2d58d63ce58551f6c734c
author: spf13 <[email protected]>
date: Wed May 28 15:11:54 EDT 2014

SiteInfo is now a pointer on the Node

--- a/hugolib/node.go
+++ b/hugolib/node.go
@@ -20,7 +20,7 @@
 
 type Node struct {
 	RSSLink template.HTML
-	Site    SiteInfo
+	Site    *SiteInfo
 	//	layout      string
 	Data        map[string]interface{}
 	Title       string
--- a/hugolib/page_permalink_test.go
+++ b/hugolib/page_permalink_test.go
@@ -41,7 +41,7 @@
 					Section: "z",
 					Url:     test.url,
 				},
-				Site: SiteInfo{
+				Site: &SiteInfo{
 					BaseUrl: test.base,
 				},
 			},
--- a/hugolib/site.go
+++ b/hugolib/site.go
@@ -330,7 +330,7 @@
 			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 @@
 
 	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) NewNode() *Node {
 	return &Node{
 		Data: make(map[string]interface{}),
-		Site: s.Info,
+		Site: &s.Info,
 	}
 }