Implement draft system

This commit is contained in:
n_u
2026-08-04 11:16:57 -05:00
parent 42cee91016
commit 6f5394010b
4 changed files with 21 additions and 2 deletions
+8
View File
@@ -100,6 +100,14 @@ export default async function (eleventyConfig) {
return arr.slice(1, arr.length);
});
// Preprocessors
// Exclude drafts from full build
eleventyConfig.addPreprocessor("drafts", "*", (data, content) => {
if (data.draft && process.env.ELEVENTY_RUN_MODE === "build") {
return false;
}
});
// Transforms
eleventyConfig.addTransform("prettier", function (content, outputPath) {
if (outputPath && outputPath.endsWith(".html")) {