lewisdale.dev/config/filters/getPost.js

5 lines
211 B
JavaScript
Raw Normal View History

2024-07-10 11:05:12 +00:00
module.exports = function(eleventyConfig) {
eleventyConfig.addFilter('metricsToPosts', function(metrics, posts) {
return metrics.map(metric => posts.find(post => post.url === metric.post));
})
};