import { defineConfig } from "ssqch";
import { imagePlugin } from "ssqch/image";
import { linksPlugin } from "ssqch/links";
import { minifyPlugin } from "ssqch/minify";
export default defineConfig(({ env }) => ({
dirs: { input: "src", output: "dist" },
templateFormats: ["edge", "md"],
filters: {
readableDate: (date) => date.toLocaleDateString("en-US", { year: "numeric", month: "long", day: "numeric", timeZone: "UTC" }),
},
collections: {
newestPosts: (pages) => [...pages.byTag("posts")].reverse(),
},
plugins: [
imagePlugin({ formats: ["webp", "auto"], widths: [400, 800, 1200] }),
linksPlugin(),
env === "production" && minifyPlugin(),
],
}));