build prev and add draft handling

This commit is contained in:
2026-03-24 09:50:56 -07:00
parent 422a0e45e8
commit 22d2ea2835
280 changed files with 3608 additions and 3571 deletions

View File

@ -116,6 +116,13 @@ export default async function(eleventyConfig) {
/* Syntax highlighting */
eleventyConfig.addPlugin(syntaxHighlight);
/* Draft handling */
eleventyConfig.addPreprocessor("drafts", "*", (data, content) => {
if(data.draft && process.env.ELEVENTY_RUN_MODE === "build") {
return false;
}
});
/* Shortcodes */
eleventyConfig.addShortcode("currentBuildDate", () => {
return (new Date()).toISOString();