fix wrong renderlist feed permalink

when not using ugly urls, the feed permalink does not end up in the
expected location, and instead always behaves as if using ugly urls.

this fixes that behavior and inserts the feed xml file into the
directory as index.xml.

fixes #32
This commit is contained in:
elij 2013-08-12 18:51:01 -07:00
parent cb39f052d1
commit 2f9b582dbe

View file

@ -470,7 +470,11 @@ func (s *Site) RenderLists() error {
if a := s.Tmpl.Lookup("rss.xml"); a != nil {
// XML Feed
if s.Config.UglyUrls {
n.Url = Urlize(section + ".xml")
} else {
n.Url = Urlize(section + "/" + "index.xml")
}
n.Permalink = template.HTML(string(n.Site.BaseUrl) + n.Url)
y := s.NewXMLBuffer()
s.Tmpl.ExecuteTemplate(y, "rss.xml", n)