Permalink
Browse files

hugolib: Default rssLimit to unlimited

Fixes #3145
  • Loading branch information...
moorereason authored and bep committed Mar 10, 2017
1 parent 48120cc commit fe41bd61bb21fa17a7e80ac8ee804fe010193e7e
Showing with 2 additions and 2 deletions.
  1. +1 −1 hugolib/config.go
  2. +1 −1 hugolib/site_render.go
View
@@ -102,7 +102,7 @@ func loadDefaultSettingsFor(v *viper.Viper) {
v.SetDefault("paginatePath", "page")
v.SetDefault("blackfriday", c.NewBlackfriday())
v.SetDefault("rSSUri", "index.xml")
v.SetDefault("rssLimit", 15)
v.SetDefault("rssLimit", -1)
v.SetDefault("sectionPagesMenu", "")
v.SetDefault("disablePathToLower", false)
v.SetDefault("hasCJKLanguage", false)
View
@@ -157,7 +157,7 @@ func (s *Site) renderRSS(p *Page) error {
}
limit := s.Cfg.GetInt("rssLimit")
if len(rssPage.Pages) > limit {
if limit >= 0 && len(rssPage.Pages) > limit {
rssPage.Pages = rssPage.Pages[:limit]
rssPage.Data["Pages"] = rssPage.Pages
}

2 comments on commit fe41bd6

@rdwatters

This comment has been minimized.

Show comment
Hide comment
@rdwatters

rdwatters Mar 10, 2017

Contributor

@moorereason Is this accurate?

By default, Hugo will create an unlimited number of RSS entries. You can limit this number via the rssLimit: field in your config file.

Contributor

rdwatters replied Mar 10, 2017

@moorereason Is this accurate?

By default, Hugo will create an unlimited number of RSS entries. You can limit this number via the rssLimit: field in your config file.

@moorereason

This comment has been minimized.

Show comment
Hide comment
@moorereason

moorereason Mar 10, 2017

Contributor

Yes, that's a correct description of the change. Thanks

Contributor

moorereason replied Mar 10, 2017

Yes, that's a correct description of the change. Thanks

Please sign in to comment.