Carpentry & Mounting h1: Georgia italic ampersand via styleAmp filter
This commit is contained in:
@@ -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(/&|&/g, '<span class="amp">&</span>')
|
||||
);
|
||||
|
||||
return {
|
||||
templateFormats: ["njk", "html", "xml", "txt"],
|
||||
htmlTemplateEngine: "njk",
|
||||
|
||||
Reference in New Issue
Block a user