hugo/tpl/tplimpl
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
..
amber_compiler.go tpl: Refactor package 2017-02-17 17:15:26 +01:00
reflect_helpers.go tpl: Refactor package 2017-02-17 17:15:26 +01:00
template.go tpl: Refactor package 2017-02-17 17:15:26 +01:00
template_ast_transformers.go tpl: Refactor package 2017-02-17 17:15:26 +01:00
template_ast_transformers_test.go tpl: Refactor package 2017-02-17 17:15:26 +01:00
template_embedded.go hugolib: Make RSS item limit configurable 2017-02-17 19:53:08 +01:00
template_func_truncate.go tpl: Refactor package 2017-02-17 17:15:26 +01:00
template_func_truncate_test.go tpl: Refactor package 2017-02-17 17:15:26 +01:00
template_funcs.go tplimpl: Refactor imageConfig into a struct 2017-02-17 17:15:26 +01:00
template_funcs_test.go tplimpl: Refactor imageConfig into a struct 2017-02-17 17:15:26 +01:00
template_resources.go tplimpl: Fix data race in resGetResource 2017-02-17 17:15:26 +01:00
template_resources_test.go tpl: Refactor package 2017-02-17 17:15:26 +01:00
template_test.go tpl: Refactor package 2017-02-17 17:15:26 +01:00