lewisdale.dev/config/filters/filterBy.js

7 lines
221 B
JavaScript
Raw Normal View History

2023-12-30 15:38:09 +00:00
module.exports = (eleventyConfig) => {
eleventyConfig.addFilter('filterBy', (collection, value) => {
return collection.filter((item) => {
return item.data.tags.includes(value);
})
});
}