feat: Replace layouts template
- Change nunjucks to liquid for layouts screen - Add shortcodes for placeholders to eleventy
This commit is contained in:
parent
b10379782f
commit
d64bf61a9c
4 changed files with 335 additions and 318 deletions
24
.eleventy.js
24
.eleventy.js
|
|
@ -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)': '.'});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue