Merge pull request #32 from cactus/issue-32

indexes rss.xml has wrong permalinks with ugly urls off
This commit is contained in:
Steve Francia 2013-08-12 19:42:44 -07:00
commit c689d46aa1

View file

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