Add CSS purging

This commit is contained in:
天クマ 2026-07-04 16:05:55 -03:00
commit 6a6c9043d4
5 changed files with 306 additions and 1 deletions

View file

@ -9,6 +9,7 @@ import Webmentions from "eleventy-plugin-webmentions"; // configure later
import pluginInlineLinkFavicon from "eleventy-plugin-inline-link-favicon";
import poison from "eleventy-plugin-poison";
import mastoarchive from "eleventy-plugin-mastoarchive";
import purgeCssPlugin from "eleventy-plugin-purgecss";
// import i18n from "./_data/i18n.js";
@ -28,6 +29,12 @@ export default function (eleventyConfig) {
cacheLocation: ".cache/mastodon.json"
});
eleventyConfig.addPlugin(purgeCssPlugin, {
config: "./purgecss.config.cjs",
quiet: false,
});
eleventyConfig.addCollection("post", function (collectionApi) {
return collectionApi
.getFilteredByGlob("./posts/*")