shithub: hugo

Download patch

ref: c689d46aa19f0372d909e87a1ecd187443f2b6c7
parent: cb39f052d19dfbf1463b028e5173fc53d917cac1
parent: 023567b05e1542cbdd25514f2ba7dd15a6e3a6c8
author: Steve Francia <[email protected]>
date: Mon Aug 12 15:42:44 EDT 2013

Merge pull request #32 from cactus/issue-32

indexes rss.xml has wrong permalinks with ugly urls off

--- a/hugolib/site.go
+++ b/hugolib/site.go
@@ -470,7 +470,11 @@
 
 		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)