13 lines
385 B
JavaScript
13 lines
385 B
JavaScript
module.exports = (eleventyConfig) => {
|
|
eleventyConfig.addFilter('filterBy', (collection, value) => {
|
|
return collection.filter((item) => {
|
|
return item.data.tags.includes(value);
|
|
})
|
|
});
|
|
|
|
eleventyConfig.addFilter('except', (collection, value) => {
|
|
return collection.filter((item) => {
|
|
return item !== value;
|
|
})
|
|
});
|
|
} |