lewisdale.dev/config/filters/getPost.js
Lewis Dale e0c315d837
Some checks failed
Build and copy to prod / build-and-copy (push) Has been cancelled
Upgrade to Eleventy 3.0.0
2024-10-06 12:36:54 +01:00

5 lines
209 B
JavaScript

export default function(eleventyConfig) {
eleventyConfig.addFilter('metricsToPosts', function(metrics, posts) {
return metrics.map(metric => posts.find(post => post.url === metric.post));
})
};