Phase 4: implement full static site (Eleventy, 15 pages, CSS, JS)

This commit is contained in:
Tom Roth
2026-07-31 08:33:06 +02:00
parent ecbd9f94e5
commit 34f7f5a1f5
24 changed files with 5986 additions and 8 deletions

28
.eleventy.js Normal file
View File

@@ -0,0 +1,28 @@
module.exports = function (eleventyConfig) {
// Pass static assets through to _site/
eleventyConfig.addPassthroughCopy("src/css");
eleventyConfig.addPassthroughCopy("src/js");
eleventyConfig.addPassthroughCopy({ "assets": "assets" });
// Format phone number as a tel: href (strips everything but digits and +)
eleventyConfig.addFilter("telHref", (phone) =>
"tel:" + phone.replace(/[^0-9+]/g, "")
);
// Current year for footer copyright
eleventyConfig.addFilter("currentYear", () =>
new Date().getFullYear()
);
return {
templateFormats: ["njk", "html", "xml", "txt"],
htmlTemplateEngine: "njk",
markdownTemplateEngine: "njk",
dir: {
input: "src",
output: "_site",
includes: "_includes",
data: "_data",
},
};
};