This commit is contained in:
parent
2bc1a4c684
commit
a7e1968a8c
8 changed files with 271 additions and 56 deletions
|
|
@ -1,18 +1,22 @@
|
|||
import { feedPlugin } from "@11ty/eleventy-plugin-rss";
|
||||
import eleventyNavigationPlugin from "@11ty/eleventy-navigation";
|
||||
import CleanCSS from "clean-css";
|
||||
import { transform } from "lightningcss";
|
||||
|
||||
export default function(eleventyConfig) {
|
||||
eleventyConfig.addPassthroughCopy("assets/");
|
||||
eleventyConfig.addPassthroughCopy("styles/");
|
||||
eleventyConfig.addPassthroughCopy("scripts/");
|
||||
|
||||
eleventyConfig.addPlugin(eleventyNavigationPlugin);
|
||||
|
||||
eleventyConfig.addFilter("cssmin", function (code) {
|
||||
return new CleanCSS({}).minify(code).styles;
|
||||
const result = transform({
|
||||
code: Buffer.from(code, 'utf-8'),
|
||||
minify: true,
|
||||
})
|
||||
return result.code.toString('utf-8')
|
||||
});
|
||||
|
||||
eleventyConfig.addPlugin(eleventyNavigationPlugin);
|
||||
|
||||
eleventyConfig.addPlugin(feedPlugin, {
|
||||
type: "atom", // or "rss", "json"
|
||||
outputPath: "/feed.xml",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue