42 lines
No EOL
1.2 KiB
JavaScript
42 lines
No EOL
1.2 KiB
JavaScript
import { feedPlugin } from "@11ty/eleventy-plugin-rss";
|
|
import { minify } from "terser";
|
|
import { transform } from "lightningcss";
|
|
import eleventyNavigationPlugin from "@11ty/eleventy-navigation";
|
|
|
|
export default function(eleventyConfig) {
|
|
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;
|
|
});
|
|
|
|
eleventyConfig.addPlugin(eleventyNavigationPlugin);
|
|
|
|
eleventyConfig.addPlugin(feedPlugin, {
|
|
type: "atom", // or "rss", "json"
|
|
outputPath: "/feed.xml",
|
|
collection: {
|
|
name: "posts", // iterate over `collections.posts`
|
|
limit: 0, // 0 means no limit
|
|
},
|
|
metadata: {
|
|
language: "en",
|
|
title: "a gooey synth's notebooks",
|
|
subtitle: "a blog-ish writeup-ish rant-ish page to store random writings and thoughts in.",
|
|
base: "https://synth.download/",
|
|
author: {
|
|
name: "Sneexy",
|
|
email: "sneexy@synth.download", // Optional
|
|
}
|
|
}
|
|
});
|
|
}; |