Support multiple feeds + fix permalink bug #59
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey, I was wondering how hard it would be to support generating multiple feeds using the newer
feedPlugin
rather than having to manually create each feed template. I also found a bug that is fixed here but doesn't have to be tied to this.Multiple feeds
My thinking is that you would pass
feeds
in your options which is an array of the previous "options" objects and it would add a virtual template for each. So you could have multiple types of feed or feeds for different content types.This wasn't too hard to achieve but does change how it works internally a touch, the current plugin is split between
eleventyFeedPlugin
and the newaddTemplate
where that adds a single virtual template for a feed and the plugin does the things that should only happen once.the bug
In exploring this I found the feed plugin crashes if you have an item with
permalink
set to false, which I'd been using to turn-off pages without deleting them. Is this still a recommended thing to do? My solution was to add a namespaced filtereleventyFeedActive
to each of the feed types that filters out any collection items that have a falseyurl
.testing
For my garden project I was using my local version of the plugin with this setup: