hugolib: Fix RSSLink vs RSS Output Format

Fixes #3450
This commit is contained in:
Bjørn Erik Pedersen 2017-05-17 19:57:44 +03:00
parent b6ea492b7a
commit e682fcc622
2 changed files with 10 additions and 1 deletions

View file

@ -1139,7 +1139,11 @@ func (s *Site) initializeSiteInfo() {
s: s,
}
s.Info.RSSLink = s.permalink(lang.GetString("rssURI"))
rssOutputFormat, found := s.outputFormats[KindHome].GetByName(output.RSSFormat.Name)
if found {
s.Info.RSSLink = s.permalink(rssOutputFormat.BaseFilename())
}
}
func (s *Site) dataDir() string {

View file

@ -284,4 +284,9 @@ baseName = "feed"
th.assertFileContent("public/feed.xml", "Recent content on")
s := h.Sites[0]
//Issue #3450
require.Equal(t, "http://example.com/blog/feed.xml", s.Info.RSSLink)
}