fixed #171. RSSlink is now RSSLink (and matches existing docs).

Added backwards compatibility accessor for existing templates.
This commit is contained in:
spf13 2014-01-18 22:16:19 -05:00
parent ae15ff0968
commit f0634ec059
2 changed files with 489 additions and 485 deletions

View file

@ -19,7 +19,7 @@ import (
)
type Node struct {
RSSlink template.HTML
RSSLink template.HTML
Site SiteInfo
// layout string
Data map[string]interface{}
@ -30,6 +30,10 @@ type Node struct {
UrlPath
}
func (n Node) RSSlink() template.HTML {
return n.RSSLink
}
type UrlPath struct {
Url string
Permalink template.HTML

View file

@ -422,7 +422,7 @@ func (s *Site) RenderIndexes() error {
n.Url = url + ".html"
plink := n.Url
n.Permalink = permalink(s, plink)
n.RSSlink = permalink(s, url+".xml")
n.RSSLink = permalink(s, url+".xml")
n.Date = o[0].Page.Date
n.Data[singular] = o
n.Data["Pages"] = o.Pages()
@ -479,7 +479,7 @@ func (s *Site) RenderLists() error {
n.Title = strings.Title(inflect.Pluralize(section))
n.Url = helpers.Urlize(section + "/" + "index.html")
n.Permalink = permalink(s, n.Url)
n.RSSlink = permalink(s, section+".xml")
n.RSSLink = permalink(s, section+".xml")
n.Date = data[0].Page.Date
n.Data["Pages"] = data.Pages()
layout := "indexes/" + section + ".html"
@ -506,7 +506,7 @@ func (s *Site) RenderHomePage() error {
n := s.NewNode()
n.Title = n.Site.Title
n.Url = helpers.Urlize(string(n.Site.BaseUrl))
n.RSSlink = permalink(s, "index.xml")
n.RSSLink = permalink(s, "index.xml")
n.Permalink = permalink(s, "")
n.Data["Pages"] = s.Pages
err := s.render(n, "/", "index.html")