Skip to content

Commit

Permalink
Allow custom RSS Uri for section and taxonomy feeds
Browse files Browse the repository at this point in the history
  • Loading branch information
vorot93 authored and tychoish committed Aug 13, 2017
1 parent 2a7a7e2 commit 6a2890a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions hugolib/site.go
Original file line number Diff line number Diff line change
Expand Up @@ -1123,11 +1123,11 @@ func taxonomyRenderer(s *Site, taxes <-chan taxRenderInfo, results chan<- error,

if !viper.GetBool("DisableRSS") {
// XML Feed
n.URL = s.permalinkStr(base + "/index.xml")
n.URL = s.permalinkStr(base + "/" + viper.GetString("RSSUri"))
n.Permalink = s.permalink(base)
rssLayouts := []string{"taxonomy/" + t.singular + ".rss.xml", "_default/rss.xml", "rss.xml", "_internal/_default/rss.xml"}

if err := s.renderAndWriteXML("taxonomy "+t.singular+" rss", base+"/index.xml", n, s.appendThemeTemplates(rssLayouts)...); err != nil {
if err := s.renderAndWriteXML("taxonomy "+t.singular+" rss", base+"/"+viper.GetString("RSSUri"), n, s.appendThemeTemplates(rssLayouts)...); err != nil {
results <- err
continue
}
Expand Down Expand Up @@ -1225,10 +1225,10 @@ func (s *Site) RenderSectionLists() error {

if !viper.GetBool("DisableRSS") && section != "" {
// XML Feed
n.URL = s.permalinkStr(section + "/index.xml")
n.URL = s.permalinkStr(section + "/" + viper.GetString("RSSUri"))
n.Permalink = s.permalink(section)
rssLayouts := []string{"section/" + section + ".rss.xml", "_default/rss.xml", "rss.xml", "_internal/_default/rss.xml"}
if err := s.renderAndWriteXML("section "+section+" rss", section+"/index.xml", n, s.appendThemeTemplates(rssLayouts)...); err != nil {
if err := s.renderAndWriteXML("section "+section+" rss", section+"/"+viper.GetString("RSSUri"), n, s.appendThemeTemplates(rssLayouts)...); err != nil {
return err
}
}
Expand Down

0 comments on commit 6a2890a

Please sign in to comment.