Carpentry & Mounting h1: Georgia italic ampersand via styleAmp filter

This commit is contained in:
Tom Roth
2026-07-31 10:10:02 +02:00
parent 51d7221220
commit f60e66e671
3 changed files with 12 additions and 6 deletions

View File

@@ -14,6 +14,11 @@ module.exports = function (eleventyConfig) {
new Date().getFullYear()
);
// Wrap & with a Georgia-italic span so headings use an elegant ampersand
eleventyConfig.addFilter("styleAmp", (str) =>
String(str).replace(/&amp;|&/g, '<span class="amp">&amp;</span>')
);
return {
templateFormats: ["njk", "html", "xml", "txt"],
htmlTemplateEngine: "njk",