lewisdale.dev/config/filters/getPost.js

5 lines
209 B
JavaScript
Raw Normal View History

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