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

7 lines
303 B
JavaScript

export default 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())
);
}