hugo/hugolib
Cameron Moore 10c13f5d79 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
2017-02-17 19:53:08 +01:00
..
testdata
alias_test.go all: Refactor to nonglobal Viper, i18n etc. 2017-02-17 17:15:26 +01:00
author.go
case_insensitive_test.go all: Refactor to nonglobal Viper, i18n etc. 2017-02-17 17:15:26 +01:00
config.go hugolib: Make RSS item limit configurable 2017-02-17 19:53:08 +01:00
config_test.go all: Refactor to nonglobal Viper, i18n etc. 2017-02-17 17:15:26 +01:00
datafiles_test.go all: Refactor to nonglobal Viper, i18n etc. 2017-02-17 17:15:26 +01:00
embedded_shortcodes_test.go tpl: Refactor package 2017-02-17 17:15:26 +01:00
gitinfo.go all: Refactor to nonglobal Viper, i18n etc. 2017-02-17 17:15:26 +01:00
handler_base.go
handler_file.go
handler_meta.go
handler_page.go all: Refactor to nonglobal Viper, i18n etc. 2017-02-17 17:15:26 +01:00
handler_test.go all: Refactor to nonglobal Viper, i18n etc. 2017-02-17 17:15:26 +01:00
hugo_info.go
hugo_sites.go tplimpl: Refactor imageConfig into a struct 2017-02-17 17:15:26 +01:00
hugo_sites_build.go all: Refactor to nonglobal Viper, i18n etc. 2017-02-17 17:15:26 +01:00
hugo_sites_build_test.go hugolib: Add test case for empty Pages in regular pages 2017-02-17 17:26:09 +01:00
media.go
menu.go
menu_test.go all: Refactor to nonglobal Viper, i18n etc. 2017-02-17 17:15:26 +01:00
multilingual.go all: Refactor to nonglobal Viper, i18n etc. 2017-02-17 17:15:26 +01:00
node_as_page_test.go all: Refactor to nonglobal Viper, i18n etc. 2017-02-17 17:15:26 +01:00
page.go hugolib: Remove deprecated marked for removal 2017-02-17 17:20:46 +01:00
page_collections.go
page_permalink_test.go all: Refactor to nonglobal Viper, i18n etc. 2017-02-17 17:15:26 +01:00
page_taxonomy_test.go all: Refactor to nonglobal Viper, i18n etc. 2017-02-17 17:15:26 +01:00
page_test.go all: Refactor to nonglobal Viper, i18n etc. 2017-02-17 17:15:26 +01:00
page_time_integration_test.go all: Refactor to nonglobal Viper, i18n etc. 2017-02-17 17:15:26 +01:00
pageCache.go
pageCache_test.go all: Refactor to nonglobal Viper, i18n etc. 2017-02-17 17:15:26 +01:00
pageGroup.go
pageGroup_test.go all: Refactor to nonglobal Viper, i18n etc. 2017-02-17 17:15:26 +01:00
pageSort.go all: Refactor to nonglobal Viper, i18n etc. 2017-02-17 17:15:26 +01:00
pageSort_test.go all: Refactor to nonglobal Viper, i18n etc. 2017-02-17 17:15:26 +01:00
pagesPrevNext.go
pagesPrevNext_test.go all: Refactor to nonglobal Viper, i18n etc. 2017-02-17 17:15:26 +01:00
pagination.go all: Refactor to nonglobal Viper, i18n etc. 2017-02-17 17:15:26 +01:00
pagination_test.go all: Refactor to nonglobal Viper, i18n etc. 2017-02-17 17:15:26 +01:00
path_separators_test.go all: Refactor to nonglobal Viper, i18n etc. 2017-02-17 17:15:26 +01:00
permalinks.go
permalinks_test.go all: Refactor to nonglobal Viper, i18n etc. 2017-02-17 17:15:26 +01:00
robotstxt_test.go all: Refactor to nonglobal Viper, i18n etc. 2017-02-17 17:15:26 +01:00
rss_test.go hugolib: Make RSS item limit configurable 2017-02-17 19:53:08 +01:00
scratch.go
scratch_test.go all: Refactor to nonglobal Viper, i18n etc. 2017-02-17 17:15:26 +01:00
shortcode.go tpl: Refactor package 2017-02-17 17:15:26 +01:00
shortcode_test.go tpl: Refactor package 2017-02-17 17:15:26 +01:00
shortcodeparser.go
shortcodeparser_test.go all: Refactor to nonglobal Viper, i18n etc. 2017-02-17 17:15:26 +01:00
site.go hugolib: Remove deprecated marked for removal 2017-02-17 17:20:46 +01:00
site_render.go hugolib: Make RSS item limit configurable 2017-02-17 19:53:08 +01:00
site_test.go all: Refactor to nonglobal Viper, i18n etc. 2017-02-17 17:15:26 +01:00
site_url_test.go all: Refactor to nonglobal Viper, i18n etc. 2017-02-17 17:15:26 +01:00
siteJSONEncode_test.go all: Refactor to nonglobal Viper, i18n etc. 2017-02-17 17:15:26 +01:00
sitemap.go
sitemap_test.go tpl: Refactor package 2017-02-17 17:15:26 +01:00
taxonomy.go
taxonomy_test.go all: Refactor to nonglobal Viper, i18n etc. 2017-02-17 17:15:26 +01:00
template_engines_test.go all: Refactor to nonglobal Viper, i18n etc. 2017-02-17 17:15:26 +01:00
template_test.go all: Refactor to nonglobal Viper, i18n etc. 2017-02-17 17:15:26 +01:00
testhelpers_test.go tpl: Refactor package 2017-02-17 17:15:26 +01:00
translations.go