site/eleventy.config.js
Ruben bafb9687c9
All checks were successful
/ build (push) Successful in 20s
i forgot to push this commit
2025-09-17 21:29:46 -05:00

25 lines
No EOL
950 B
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({ "sneexy/notebook/": "~sneexy/notebook/" }); // notebook page generated by quartz seperately - see https://forged.synth.download/sneexy/notebook
eleventyConfig.addPassthroughCopy("custard.html");
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;
});
};