site/eleventy.config.js
Ruben f108b9950e
All checks were successful
/ build (push) Successful in 2m15s
add my own notebook page powered by quartz
2025-06-14 01:35:21 -05:00

23 lines
No EOL
761 B
JavaScript

import { minify } from "terser";
import { transform } from "lightningcss";
import eleventyNavigationPlugin from "@11ty/eleventy-navigation";
export default function(eleventyConfig) {
eleventyConfig.addPassthroughCopy("assets/");
eleventyConfig.addPassthroughCopy("sneexy/notebook/"); // notebook page generated by quartz seperately - see https://forged.synth.download/sneexy/notebook
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;
});
eleventyConfig.addPlugin(eleventyNavigationPlugin);
};