New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hugolib: Make RSS item limit configurable #3036

Merged
merged 1 commit into from Feb 17, 2017

Conversation

Projects
None yet
2 participants
@moorereason
Contributor

moorereason commented Feb 13, 2017

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

@bep

This comment has been minimized.

Show comment
Hide comment
@bep

bep Feb 17, 2017

Member

I will merge this if you can resolve the merge conflicts ... (created by me :-))

Member

bep commented Feb 17, 2017

I will merge this if you can resolve the merge conflicts ... (created by me :-))

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
@moorereason

This comment has been minimized.

Show comment
Hide comment
@moorereason

moorereason Feb 17, 2017

Contributor

I knew I should have waited. 😉 Rebased with master

Contributor

moorereason commented Feb 17, 2017

I knew I should have waited. 😉 Rebased with master

@bep bep added the Enhancement label Feb 17, 2017

@bep

This comment has been minimized.

Show comment
Hide comment
@bep

bep Feb 17, 2017

Member

There is build failure.

Member

bep commented Feb 17, 2017

There is build failure.

@moorereason

This comment has been minimized.

Show comment
Hide comment
@moorereason

moorereason Feb 17, 2017

Contributor

Hmm...looks like it's outside of this PR:

hugolib\path_separators_windows_test.go:29: undefined: tpl.GoHTMLTemplate

Contributor

moorereason commented Feb 17, 2017

Hmm...looks like it's outside of this PR:

hugolib\path_separators_windows_test.go:29: undefined: tpl.GoHTMLTemplate

@moorereason

This comment has been minimized.

Show comment
Hide comment
@moorereason

moorereason Feb 17, 2017

Contributor

master is failing in AppVeyor, too.

Contributor

moorereason commented Feb 17, 2017

master is failing in AppVeyor, too.

@bep

This comment has been minimized.

Show comment
Hide comment
@bep

bep Feb 17, 2017

Member

Which seems to be my fault ... hmm.

Member

bep commented Feb 17, 2017

Which seems to be my fault ... hmm.

@bep

This comment has been minimized.

Show comment
Hide comment
@bep

bep Feb 17, 2017

Member

Yes, my mistake, fixed now. Just let it build on Travis and it is good.

Member

bep commented Feb 17, 2017

Yes, my mistake, fixed now. Just let it build on Travis and it is good.

@bep bep merged commit 10c13f5 into gohugoio:master Feb 17, 2017

2 of 4 checks passed

continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
continuous-integration/wercker Wercker build passed
Details
licence/cla Contributor License Agreement is signed.
Details

@moorereason moorereason deleted the moorereason:iss3035 branch Mar 1, 2017

@bep bep referenced this pull request Mar 8, 2017

Closed

Raise the default rssLimit? #3145

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment