lewisdale.dev/config/collections/posts.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

7 lines
305 B
JavaScript

module.exports = function (eleventyConfig) {
eleventyConfig.addCollection('posts',collectionApi =>
collectionApi.getFilteredByTag("posts")
.filter(p => process.env.DEBUG || !p.data.tags.includes("draft"))
.filter(p => process.env.DEBUG || p.date < new Date())
);
}