Skip to content
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

Fix feed by not using pagination #333

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

frankieroberto
Copy link
Contributor

I think this should resolve #330 but need to test it somehow.

I think this should resolve #330 but need to test it somehow.
@paulrobertlloyd
Copy link
Collaborator

paulrobertlloyd commented Sep 24, 2024

Would something like this in your package.json work for testing:

"dependencies": {
  "@x-govuk/govuk-eleventy-plugin": "x-govuk/govuk-eleventy-plugin#fix-feed-by-not-using-pagination"
}

@paulrobertlloyd
Copy link
Collaborator

paulrobertlloyd commented Oct 2, 2024

Tried this PR, and for some reason slice doesn’t output any posts, causing TypeError: Cannot read properties of undefined (reading 'toISOString').

Perhaps for now, can use this solution, minus the ability to set a limit on the number of posts?

Am looking at changes that can be incorporated in the next major version that will require Eleventy 3.0, and the official RSS plugin provides a virtual RSS template that might be a better solution all round.

@frankieroberto
Copy link
Contributor Author

@paulrobertlloyd hmm I can’t work this out at all. I’ve removed slice (which doesn’t do what I thought it did in Nunjucks) and replaced it with basic if condition, and removed the sort, and all the date outputs, and I’m still getting the same TypeError: Cannot read properties of undefined (reading 'toISOString') error. Can't quite work out where this is coming from...

The official RSS plugin for Eleventy 3.0 might well be a better solution all round!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feed breaks if there are more posts than the pagination size
2 participants