From 7324691a252761bf3f27365abae21bda0eda8843 Mon Sep 17 00:00:00 2001 From: JJ Date: Wed, 19 Mar 2025 15:40:51 +0000 Subject: first commit --- eleventy.config.js | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 eleventy.config.js (limited to 'eleventy.config.js') diff --git a/eleventy.config.js b/eleventy.config.js new file mode 100644 index 0000000..9445564 --- /dev/null +++ b/eleventy.config.js @@ -0,0 +1,29 @@ +import pluginSEO from "eleventy-plugin-seo"; +import htmlmin from "html-minifier-terser"; + +export default function (eleventyConfig) { + // Passthroughs + eleventyConfig.addPassthroughCopy("./dist/"); + eleventyConfig.addPassthroughCopy("./assets/"); + + // Plugins + eleventyConfig.addPlugin(pluginSEO, { + title: "Lisa McKinney", + description: "Lisa is a London based prop and interior stylist", + url: "https://lisa-mckinney.co.uk", + }); + + eleventyConfig.addTransform("htmlmin", function (content) { + if ((this.page.outputPath || "").endsWith(".html")) { + let minified = htmlmin.minify(content, { + useShortDoctype: true, + removeComments: true, + collapseWhitespace: true, + }); + + return minified; + } + + return content; + }); +} -- cgit v1.2.3