lewisdale.dev/config/filters/getPost.js
Lewis Dale 670acc7667
Some checks failed
Build and copy to prod / build-and-copy (push) Failing after 34s
Post about top Umami posts
2024-07-10 12:05:12 +01:00

5 lines
211 B
JavaScript

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