/* jshint strict: false */ import {HtmlBasePlugin} from "@11ty/eleventy"; // noinspection JSUnusedGlobalSymbols export default async function (eleventyConfig) { eleventyConfig.addPlugin(HtmlBasePlugin); eleventyConfig.setLiquidOptions({ // greedy: false, // trimOutputLeft: true, // trimOutputRight: true, // trimTagLeft: true, // trimTagRight : true, }); eleventyConfig.setNunjucksEnvironmentOptions({ // throwOnUndefined: true, trimBlocks: true }); eleventyConfig.addGlobalData('permalink', () => { return (data) => `${data.page.filePathStem}.${data.page.outputFileExtension}`; }); let demoMode = false; let pageBase = demoMode ? './demo/' : './'; eleventyConfig.addGlobalData('hippie', { pageBase: pageBase, 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', domain: 'https://domain.tld' }, debugMode: true, legacyMode: false }); eleventyConfig.addShortcode('text', function (text, attrId, attrClass) { return `${text}`; }); eleventyConfig.addShortcode('link', function (target, text, attrId, attrClass) { if (!text || text === '') { text = target; } if (target.indexOf('@') !== -1) { target = 'mailto:' + target; } return `${text}`; }); eleventyConfig.addPairedShortcode("brand", function (content, attrClass = 'brand', direction = 'first') { const logo = ` `; let output = ''; switch (direction) { case 'first': output = logo + `${content}`; break; case 'last': output = `${content}` + logo; break; } return `