mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
parent
48120ccfd2
commit
fe41bd61bb
2 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue