feat: Added head filter

This commit is contained in:
2025-08-03 03:20:42 -04:00
parent eca0aad00e
commit 07af321fda
2 changed files with 13 additions and 0 deletions

10
src/_config/filters.js Normal file
View File

@ -0,0 +1,10 @@
export default function(eleventyConfig) {
// Get the first element of a collection.
eleventyConfig.addFilter("head", (array) => {
if(!Array.isArray(array) || array.length === 0) {
return null;
}
return array[0];
});
};