-
Notifications
You must be signed in to change notification settings - Fork 14
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
Feed breaks if there are more posts than the pagination size #330
Comments
Ah, this is probably why we didn’t use pagination in the first place; it’s going to try and create a second file, also called feed.xml. Why did we move to using - {%- for item in pagination.items %}
+ {%- for item in collections.post | limit: size | reverse %} And the documentation updated to use the following front matter: ---
eleventyExcludeFromCollections: true
layout: feed
permalink: /feed.xml
size: 20
--- I note that we’re using - <updated>{{ collections.post | getNewestCollectionItemDate | dateToRfc3339 }}</updated>
+ <updated>{{ collections[collection] | getNewestCollectionItemDate | dateToRfc3339 }}</updated>
- {%- for item in pagination.items %}
+ {%- for item in collections[collection] | limit: size | reverse %} And use the following front matter: ---
eleventyExcludeFromCollections: true
layout: feed
permalink: /feed.xml
collection: posts
size: 20
--- Want to try that? |
I think this should resolve #330 but need to test it somehow.
Yeah, I can’t remember. Maybe it was just to specify the collection (so you could have multiple feeds) or size. But, err, clearly didn’t think ahead to what happens when you overflow the size. I guess it could be fixed by using a permalink like this:
...but it's not really necessary to paginate your rss feeds. Your suggestion sounds better. Have tried it in #333 - although |
If you follow the instructions for feeds but have more posts in the feed than specified in the pagination size, it breaks with the error message:
Need to find a way to only include the most recent x items in the feed rather than one file per page.
The text was updated successfully, but these errors were encountered: