mirror of
https://github.com/gohugoio/hugo.git
synced 2025-02-23 14:13:14 +00:00
SiteInfo is now a pointer on the Node
This commit is contained in:
parent
7a8b754cad
commit
35a605976e
3 changed files with 5 additions and 5 deletions
|
@ -20,7 +20,7 @@ import (
|
|||
|
||||
type Node struct {
|
||||
RSSLink template.HTML
|
||||
Site SiteInfo
|
||||
Site *SiteInfo
|
||||
// layout string
|
||||
Data map[string]interface{}
|
||||
Title string
|
||||
|
|
|
@ -41,7 +41,7 @@ func TestPermalink(t *testing.T) {
|
|||
Section: "z",
|
||||
Url: test.url,
|
||||
},
|
||||
Site: SiteInfo{
|
||||
Site: &SiteInfo{
|
||||
BaseUrl: test.base,
|
||||
},
|
||||
},
|
||||
|
|
|
@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue