Add post around archiving Firefish posts, as well as Draft tags for posts

This commit is contained in:
Lewis Dale committed 2024-01-26 15:04:36 +00:00
1 parent 4c5309dd17
commit 947e16ec50
4 files changed
+40 -1

No files matched your search

+2
View File
@@ -1,5 +1,7 @@
const tags = require('./tags');
const posts = require('./posts');
module.exports = function(eleventyConfig) {
eleventyConfig.addPlugin(tags);
eleventyConfig.addPlugin(posts);
}
+7
View File
@@ -0,0 +1,7 @@
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())
)
}