SiteInfo is now a pointer on the Node

This commit is contained in:
spf13 2014-05-28 19:11:54 -04:00
parent 7a8b754cad
commit 35a605976e
3 changed files with 5 additions and 5 deletions

View file

@ -20,7 +20,7 @@ import (
type Node struct {
RSSLink template.HTML
Site SiteInfo
Site *SiteInfo
// layout string
Data map[string]interface{}
Title string

View file

@ -41,7 +41,7 @@ func TestPermalink(t *testing.T) {
Section: "z",
Url: test.url,
},
Site: SiteInfo{
Site: &SiteInfo{
BaseUrl: test.base,
},
},

View file

@ -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,
}
}