site/eleventy.config.js
zenfyr 2456883e0a
All checks were successful
/ build (push) Successful in 4m7s
add did.jdon
2025-10-27 12:57:41 -05:00

26 lines
1 KiB
JavaScript

import { minify } from "terser";
import { transform } from "lightningcss";
import eleventyNavigationPlugin from "@11ty/eleventy-navigation";
import syntaxHighlight from "@11ty/eleventy-plugin-syntaxhighlight";
export default function(eleventyConfig) {
eleventyConfig.addPassthroughCopy(".well-known/"); // static identity stuff
eleventyConfig.addPassthroughCopy({ "_includes/other/custard.html": "custard.html" });
eleventyConfig.addPassthroughCopy({ "sneexy/notebook/": "~sneexy/notebook/" }); // notebook page generated by quartz seperately - see https://forged.synth.download/sneexy/notebook
eleventyConfig.addPlugin(eleventyNavigationPlugin);
eleventyConfig.addPlugin(syntaxHighlight);
eleventyConfig.addPassthroughCopy("assets/");
eleventyConfig.addFilter("cssmin", function (code) {
const result = transform({
code: Buffer.from(code, 'utf-8'),
minify: true,
})
return result.code.toString('utf-8')
});
eleventyConfig.addFilter("jsmin", async function (code) {
const minified = await minify(code);
return minified.code;
});
};