From 2f9b582dbe44af862e00348825c308a223d57407 Mon Sep 17 00:00:00 2001 From: elij Date: Mon, 12 Aug 2013 18:51:01 -0700 Subject: [PATCH] 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 --- hugolib/site.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hugolib/site.go b/hugolib/site.go index 105034878..08a0e54b4 100644 --- a/hugolib/site.go +++ b/hugolib/site.go @@ -470,7 +470,11 @@ func (s *Site) RenderLists() error { if a := s.Tmpl.Lookup("rss.xml"); a != nil { // XML Feed - n.Url = Urlize(section + ".xml") + 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)