import { IdAttributePlugin, InputPathToUrlTransformPlugin, HtmlBasePlugin } from "@11ty/eleventy"; import { feedPlugin } from "@11ty/eleventy-plugin-rss"; import pluginSyntaxHighlight from "@11ty/eleventy-plugin-syntaxhighlight"; import pluginNavigation from "@11ty/eleventy-navigation"; import { eleventyImageTransformPlugin } from "@11ty/eleventy-img"; 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) { data.title = `${data.title} (draft)`; } 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 .addPassthroughCopy({ "./public/": "/" }) .addPassthroughCopy("./content/feed/pretty-atom-feed.xsl"); // Run Eleventy when these files change: // https://www.11ty.dev/docs/watch-serve/#add-your-own-watch-targets // Watch CSS files eleventyConfig.addWatchTarget("css/**/*.css"); // Watch images for the image pipeline. eleventyConfig.addWatchTarget("content/**/*.{svg,webp,png,jpg,jpeg,gif}"); // Per-page bundles, see https://github.com/11ty/eleventy-plugin-bundle // Bundle