import syntaxHighlight from "@11ty/eleventy-plugin-syntaxhighlight"; import markdownIt from "markdown-it"; import markdownItAnchor from "markdown-it-anchor"; import { DateTime } from "luxon"; export default function (eleventyConfig) { // 1. Static Asset Passthrough Copy eleventyConfig.addPassthroughCopy({ "src/assets": "assets" }); // 2. Syntax Highlighting Plugin eleventyConfig.addPlugin(syntaxHighlight); // 3. Markdown-It Library Customization const markdownOptions = { html: true, breaks: false, linkify: true }; const markdownLib = markdownIt(markdownOptions).use(markdownItAnchor, { permalink: markdownItAnchor.permalink.headerLink({ safariReaderFix: true }), slugify: (s) => s .trim() .toLowerCase() .replace(/[^a-z0-9 -]/g, "") .replace(/\s+/g, "-") .replace(/-+/g, "-") }); eleventyConfig.setLibrary("md", markdownLib); // 4. Custom Filters // Format readable dates: SEP 12, 2026 eleventyConfig.addFilter("postDate", (dateObj) => { if (!dateObj) return ""; return DateTime.fromJSDate(new Date(dateObj), { zone: "utc" }) .toFormat("LLL dd, yyyy") .toUpperCase(); }); // ISO date format for