SiteInfo is now a pointer on the Node - hugo - [fork] hugo port for 9front
HTML git clone git@git.drkhsh.at/hugo.git
DIR Log
DIR Files
DIR Refs
DIR Submodules
DIR README
DIR LICENSE
---
DIR commit 35a605976ecc110e21af4ae4eae8d92768249197
DIR parent 7a8b754cada398241fc2d58d63ce58551f6c734c
HTML Author: spf13 <steve.francia@gmail.com>
Date: Wed, 28 May 2014 19:11:54 -0400
SiteInfo is now a pointer on the Node
Diffstat:
M hugolib/node.go | 2 +-
M hugolib/page_permalink_test.go | 2 +-
M hugolib/site.go | 6 +++---
3 files changed, 5 insertions(+), 5 deletions(-)
---
DIR diff --git 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
DIR diff --git 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,
},
},
DIR diff --git 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,
}
}