feat: add drafts

This commit is contained in:
Sebin Nyshkim 2025-02-02 05:42:01 +01:00
parent b195c84f12
commit 509449c9e5
2 changed files with 23 additions and 1 deletions

View file

@ -32,7 +32,11 @@ export default async function (eleventyConfig) {
eleventyConfig.addPassthroughCopy('./src/img/sebin.png');
eleventyConfig.addWatchTarget('./src/img/sebin.png');
eleventyConfig.addCollection('posts', (collection) => collection.getFilteredByGlob('./src/posts/*.md'));
eleventyConfig.addCollection('posts', (collection) =>
process.env.ELEVENTY_PRODUCTION
? collection.getFilteredByGlob('./src/posts/*.md')
: collection.getFilteredByGlob('./src/{posts,drafts}/*.md')
);
eleventyConfig.addPlugin(eleventyPluginCiu);
eleventyConfig.addPlugin(eleventyPluginEmbedEverything);