Compare commits

...
2 Commits
Author SHA1 Message Date
inherentlee 8201b368ed remove _live 2026-09-17 19:31:57 -07:00
inherentlee 03e85bcb35 draft handling 2026-09-17 07:58:37 -07:00
3 changed files with 12 additions and 2 deletions

No files matched your search

-1
View File
@@ -1,3 +1,2 @@
_live
_site
node_modules
+11
View File
@@ -69,6 +69,17 @@ export default async function (eleventyConfig) {
/* All filters from _config/filters.js */
eleventyConfig.addPlugin(pluginFilters);
/* Draft handling */
eleventyConfig.addPreprocessor("drafts", "*", (data, content) => {
if (data.draft) {
data.title = `${data.title} (draft)`;
}
if(data.draft && process.env.ELEVENTY_RUN_MODE === "build") {
return false;
}
});
/* Shortcodes */
eleventyConfig.addShortcode("currentBuildDate", () => {
return new Date().toISOString();
+1 -1
View File
@@ -4,7 +4,7 @@
"description": "",
"scripts": {
"build": "rm -rf _site && npx @11ty/eleventy --quiet",
"dev": "rm -rf _live && npx @11ty/eleventy --serve --quiet --output _live"
"dev": "rm -rf _site && npx @11ty/eleventy --serve --quiet --output _site"
},
"author": "Lee Cattarin",
"license": "AGPL-3.0-only",