lewisdale.dev/config/collections/posts.js

7 lines
303 B
JavaScript
Raw Permalink Normal View History

2024-10-06 11:36:54 +00:00
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())
2024-07-10 11:05:12 +00:00
);
}