7 lines
304 B
JavaScript
7 lines
304 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())
|
||
|
)
|
||
|
}
|