mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-25 16:52:29 +00:00
Merge pull request #32 from cactus/issue-32
indexes rss.xml has wrong permalinks with ugly urls off
This commit is contained in:
commit
c689d46aa1
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||||
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)
|
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)
|
||||||
|
|
Loading…
Reference in a new issue