ref: 7a521ad1a1ac956dc638f1934509220760f9171f
parent: b7b6f054a90f9f9b97cdf99fd24dccb38e332422
author: spf13 <[email protected]>
date: Thu Jul 11 18:31:58 EDT 2013
Fixing some RSS issues
--- a/hugolib/site.go
+++ b/hugolib/site.go
@@ -276,6 +276,7 @@
// XML Feed
y := s.NewXMLBuffer()
n.Url = Urlize(plural + "/" + k + ".xml")
+ n.Permalink = template.HTML(string(n.Site.BaseUrl) + "/" + plural + "/" + k + ".xml")
s.Tmpl.ExecuteTemplate(y, "rss.xml", n)
s.WritePublic(plural, k+".xml", y.Bytes())
}
@@ -300,6 +301,7 @@
if a := s.Tmpl.Lookup("rss.xml"); a != nil {
// XML Feed
n.Url = Urlize(section + "/index.xml")
+ n.Permalink = template.HTML(string(n.Site.BaseUrl) + "/" + section + "/index.xml")
y := s.NewXMLBuffer()
s.Tmpl.ExecuteTemplate(y, "rss.xml", n)
s.WritePublic(section, "index.xml", y.Bytes())
@@ -325,6 +327,8 @@
if a := s.Tmpl.Lookup("rss.xml"); a != nil {
// XML Feed
n.Url = Urlize("index.xml")
+ n.Title = "Recent Content"
+ n.Permalink = template.HTML(string(n.Site.BaseUrl) + "/index.xml")
y := s.NewXMLBuffer()
s.Tmpl.ExecuteTemplate(y, "rss.xml", n)
s.WritePublic("", "index.xml", y.Bytes())