feat: Replace layouts template

- Change nunjucks to liquid for layouts screen
- Add shortcodes for placeholders to eleventy
This commit is contained in:
sthag 2026-02-21 12:16:34 +01:00
parent b10379782f
commit d64bf61a9c
4 changed files with 335 additions and 318 deletions

View file

@ -1,4 +1,4 @@
const { EleventyHtmlBasePlugin } = require("@11ty/eleventy");
const {EleventyHtmlBasePlugin} = require("@11ty/eleventy");
module.exports = function (eleventyConfig) {
eleventyConfig.addPlugin(EleventyHtmlBasePlugin);
@ -28,10 +28,32 @@ module.exports = function (eleventyConfig) {
brand: 'hippie',
titlePrefix: '',
titlePostfix: ' - HIPPIE',
placeholders: {
name: 'Vorname Nachname',
address: 'Straße Nr., PLZ Ort',
phone: '+49 (0)101 1337 48',
mail: 'name@domain.tld'
},
debugMode: true,
legacyMode: false
});
eleventyConfig.addShortcode('text', function (text, attrId, attrClass) {
return `<span id="${attrId}" class="${attrClass}">${text}</span>`;
});
eleventyConfig.addShortcode('link', function (target, text, attrId, attrClass) {
if (text === '') {
text = target;
}
if (target.indexOf('@') !== -1) {
target = 'mailto:' + target;
}
return `<a id="${attrId}" class="${attrClass}" href="${target}">${text}</a>`;
});
eleventyConfig.addPassthroughCopy({'source/art/images': 'art'});
eleventyConfig.addPassthroughCopy({'source/art/favicons/**/*.+(ico|png|svg)': '.'});