Drastically simplify the drafts workflow
This commit is contained in:
@@ -8,6 +8,13 @@ import pluginFilters from "./_config/filters.js";
|
||||
|
||||
/** @param {import("@11ty/eleventy").UserConfig} eleventyConfig */
|
||||
export default async function(eleventyConfig) {
|
||||
// Drafts, see also _data/eleventyDataSchema.js
|
||||
eleventyConfig.addPreprocessor("drafts", "*", (data, content) => {
|
||||
if(data.draft && process.env.ELEVENTY_RUN_MODE === "build") {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
// Copy the contents of the `public` folder to the output folder
|
||||
// For example, `./public/css/` ends up in `_site/css/`
|
||||
eleventyConfig
|
||||
|
||||
Reference in New Issue
Block a user