2025-06-02 12:12:28 -05:00
import { minify } from "terser" ;
2025-06-02 10:50:26 -05:00
import { transform } from "lightningcss" ;
2025-06-02 12:12:28 -05:00
import eleventyNavigationPlugin from "@11ty/eleventy-navigation" ;
2025-07-01 23:18:31 -05:00
import syntaxHighlight from "@11ty/eleventy-plugin-syntaxhighlight" ;
2025-04-20 03:23:57 -05:00
export default function ( eleventyConfig ) {
2025-10-28 08:27:52 -05:00
eleventyConfig . addPassthroughCopy ( { "_includes/assets/" : "assets/" } ) ;
eleventyConfig . addPassthroughCopy ( { "_includes/other/.well-known//" : ".well-known/" } ) ; // static identity stuff
eleventyConfig . addPassthroughCopy ( { "_includes/other/custard.html" : "custard.html" } ) ; // 🍮
eleventyConfig . addPassthroughCopy ( { "sneexy/notebook/" : "_subdomain/sneexy/notebook/" } ) ; // notebook page generated by quartz seperately - see https://forged.synth.download/sneexy/notebook
2025-07-01 23:18:31 -05:00
eleventyConfig . addPlugin ( eleventyNavigationPlugin ) ;
eleventyConfig . addPlugin ( syntaxHighlight ) ;
2025-06-29 01:03:34 -05:00
2025-06-01 13:41:16 -05:00
eleventyConfig . addFilter ( "cssmin" , function ( code ) {
2025-06-02 10:50:26 -05:00
const result = transform ( {
code : Buffer . from ( code , 'utf-8' ) ,
minify : true ,
} )
return result . code . toString ( 'utf-8' )
2025-06-01 13:41:16 -05:00
} ) ;
2025-06-02 12:12:28 -05:00
eleventyConfig . addFilter ( "jsmin" , async function ( code ) {
const minified = await minify ( code ) ;
return minified . code ;
} ) ;
2025-10-14 20:54:48 +07:00
} ;