Example repo for 11ty/eleventy#2248.
This gist was created by @pspeter3!
module.exports = function(eleventyConfig) { | |
// you’ll have to get a list of all the tags in your talks.json here which is not great but pretty easy | |
["Web Assembly"].forEach(function(tag) { | |
eleventyConfig.addCollection(tag, function(collection) { | |
return collection.getFilteredByTag("talks").filter(item => { | |
// note here the use of the pagination alias `talk` | |
return (item.data.talk.tags || []).indexOf(tag) > -1; | |
}); | |
}); | |
}); |
Example repo for 11ty/eleventy#2248.
This gist was created by @pspeter3!