summaryrefslogtreecommitdiff
path: root/eleventy.config.js
diff options
context:
space:
mode:
authorhazel <hazel@hazelthats.me>2026-03-06 16:38:48 +0100
committerhazel <hazel@hazelthats.me>2026-03-06 16:38:48 +0100
commit0ec0cc82ca10b08aad1de3acd7ce53414413caa2 (patch)
tree1e7c82e8616b18d0397b2256ef593d7bd36c0249 /eleventy.config.js
parentb531d870111587340cc892ea4f1fc4e9c8fa8624 (diff)
downloadlpdu-site-0ec0cc82ca10b08aad1de3acd7ce53414413caa2.tar.gz
lpdu-site-0ec0cc82ca10b08aad1de3acd7ce53414413caa2.tar.bz2
lpdu-site-0ec0cc82ca10b08aad1de3acd7ce53414413caa2.zip
website outline, deployment code
Signed-off-by: hazel <hazel@hazelthats.me>
Diffstat (limited to 'eleventy.config.js')
-rw-r--r--eleventy.config.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/eleventy.config.js b/eleventy.config.js
new file mode 100644
index 0000000..6b0f309
--- /dev/null
+++ b/eleventy.config.js
@@ -0,0 +1,23 @@
+import { minify } from "html-minifier-next";
+
+export default async function (eleventyConfig) {
+ eleventyConfig.addPassthroughCopy({ public: "/" });
+ eleventyConfig.addGlobalData("layout", "layouts/base.njk");
+ eleventyConfig.addTransform("htmlmin", (content, path) =>
+ path.endsWith(".html")
+ ? minify(content, {
+ useShortDoctype: true,
+ removeComments: true,
+ collapseWhitespace: true,
+ })
+ : content,
+ );
+}
+
+export const config = {
+ dir: {
+ input: "content",
+ includes: "../_includes",
+ data: "../_data",
+ },
+};