Implement draft system
This commit is contained in:
@@ -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")) {
|
||||
|
||||
Reference in New Issue
Block a user