From: Bjørn Erik Pedersen Date: Wed, 17 May 2017 16:57:44 +0000 (+0300) Subject: hugolib: Fix RSSLink vs RSS Output Format X-Git-Tag: v0.21~24 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=e682fcc62233b47cf5bdcaf598ac0657ef089471;p=brevno-suite%2Fhugo hugolib: Fix RSSLink vs RSS Output Format Fixes #3450 --- diff --git a/hugolib/site.go b/hugolib/site.go index bd029d47..45acd54c 100644 --- a/hugolib/site.go +++ b/hugolib/site.go @@ -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 { diff --git a/hugolib/site_output_test.go b/hugolib/site_output_test.go index d5717363..824156e0 100644 --- a/hugolib/site_output_test.go +++ b/hugolib/site_output_test.go @@ -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) + }