Also useful for syntax on passing 2 parameters to an 11ty filter
eleventyConfig.addFilter('hasTag', function(arr, str) {
return arr.includes(str);
});
Original #
https://alexcarpenter.me/posts/2019/11/eleventy-has-tag-filter/
Also useful for syntax on passing 2 parameters to an 11ty filter
eleventyConfig.addFilter('hasTag', function(arr, str) {
return arr.includes(str);
});
https://alexcarpenter.me/posts/2019/11/eleventy-has-tag-filter/