From 696901fa2f5ee3db35d685e36f43f1c726f25b8b Mon Sep 17 00:00:00 2001 From: Cameron Moore Date: Mon, 13 Feb 2017 10:11:22 -0600 Subject: [PATCH] hugolib: Make RSS item limit configurable Add a new rssLimit site configuration option with default of 15. Prior to this fix, you could create your own RSS feed to override the default limit of 15, but we still had a hardcoded limit of 50 items set in `hugolib.renderRSS()`. With this option in place, the `range first 15 .Data.Pages` logic is no longer hardcoded into the embedded RSS template. Because the size of the slice passed to the template is now limited to rssLimit instead of 50, this commit is a breaking change for sites with a custom RSS template that expects more than 15 items. Fixes #3035 --- content/overview/configuration.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content/overview/configuration.md b/content/overview/configuration.md index 21b424ad6..b2ed06804 100644 --- a/content/overview/configuration.md +++ b/content/overview/configuration.md @@ -171,6 +171,8 @@ along with their current, default values: pygmentsStyle: "monokai" # true: use pygments-css or false: color-codes directly pygmentsUseClasses: false + # maximum number of items in the RSS feed + rssLimit: 15 # default sitemap configuration map sitemap: # filesystem path to read files relative from