Support aggregation for filter addition #3387
Labels
enhancement
feature: 🛠 configuration
Related to Eleventy’s Configuration file
needs-votes
A feature request on the backlog that needs upvotes or downvotes. Remove this label when resolved.
This is a super low priority nice-to-have QoL addition, but thought I should probably open a new issue than try to stuff it into an "Oh and by the way" in #3386.
Most of my 11ty projects have an import like:
and a mass-add statement in the config:
It would be nice if
addFilter()
supported aggregation: if you pass a whole object, simply add all values that are functions as filters, using their keys as names.This would turn my little snippet into a single line:
Or, you could use a separate name:
And even for those defining filters inline in their config file, it would make the definitions far more readable:
The text was updated successfully, but these errors were encountered: