diff options
Diffstat (limited to 'eleventy.config.js')
-rw-r--r-- | eleventy.config.js | 29 |
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; + }); +} |