aboutsummaryrefslogtreecommitdiff
path: root/eleventy.config.js
diff options
context:
space:
mode:
authorJJ <nicetry@noemail.com>2025-03-19 15:40:51 +0000
committerJJ <nicetry@noemail.com>2025-03-19 15:40:51 +0000
commit7324691a252761bf3f27365abae21bda0eda8843 (patch)
tree26f6fd57acca7db7b8cd774fc6dca38604f47b4f /eleventy.config.js
first commitHEADmain
Diffstat (limited to 'eleventy.config.js')
-rw-r--r--eleventy.config.js29
1 files changed, 29 insertions, 0 deletions
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;
+ });
+}