2026-03-04 19:22:55 +01:00
|
|
|
/* jshint strict: false */
|
2026-02-19 20:43:52 +01:00
|
|
|
|
2026-03-04 19:22:55 +01:00
|
|
|
import {HtmlBasePlugin} from "@11ty/eleventy";
|
|
|
|
|
|
|
|
|
|
// noinspection JSUnusedGlobalSymbols
|
|
|
|
|
export default async function (eleventyConfig) {
|
|
|
|
|
eleventyConfig.addPlugin(HtmlBasePlugin);
|
2024-08-11 12:05:18 +02:00
|
|
|
|
2025-10-26 15:19:14 +01:00
|
|
|
eleventyConfig.setLiquidOptions({
|
|
|
|
|
// greedy: false,
|
|
|
|
|
// trimOutputLeft: true,
|
|
|
|
|
// trimOutputRight: true,
|
|
|
|
|
// trimTagLeft: true,
|
|
|
|
|
// trimTagRight : true,
|
|
|
|
|
});
|
|
|
|
|
|
2023-10-25 20:25:09 +02:00
|
|
|
eleventyConfig.setNunjucksEnvironmentOptions({
|
|
|
|
|
// throwOnUndefined: true,
|
|
|
|
|
trimBlocks: true
|
|
|
|
|
});
|
|
|
|
|
|
2025-11-01 12:04:26 +01:00
|
|
|
eleventyConfig.addGlobalData('permalink', () => {
|
2023-10-25 20:25:09 +02:00
|
|
|
return (data) => `${data.page.filePathStem}.${data.page.outputFileExtension}`;
|
|
|
|
|
});
|
|
|
|
|
|
2024-08-11 12:05:18 +02:00
|
|
|
let demoMode = false;
|
|
|
|
|
let pageBase = demoMode ? './demo/' : './';
|
|
|
|
|
|
2025-11-01 12:04:26 +01:00
|
|
|
eleventyConfig.addGlobalData('hippie', {
|
2024-08-11 12:05:18 +02:00
|
|
|
pageBase: pageBase,
|
2023-10-25 21:30:02 +02:00
|
|
|
brand: 'hippie',
|
2024-08-08 20:35:08 +02:00
|
|
|
titlePrefix: '',
|
2024-08-10 15:25:41 +02:00
|
|
|
titlePostfix: ' - HIPPIE',
|
2026-02-21 12:16:34 +01:00
|
|
|
placeholders: {
|
|
|
|
|
name: 'Vorname Nachname',
|
|
|
|
|
address: 'Straße Nr., PLZ Ort',
|
|
|
|
|
phone: '+49 (0)101 1337 48',
|
|
|
|
|
mail: 'name@domain.tld'
|
|
|
|
|
},
|
2024-08-11 17:23:31 +02:00
|
|
|
debugMode: true,
|
|
|
|
|
legacyMode: false
|
2023-10-25 21:30:02 +02:00
|
|
|
});
|
|
|
|
|
|
2026-02-21 12:16:34 +01:00
|
|
|
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>`;
|
|
|
|
|
});
|
|
|
|
|
|
2025-11-01 12:04:26 +01:00
|
|
|
eleventyConfig.addPassthroughCopy({'source/art/images': 'art'});
|
2023-10-25 20:25:09 +02:00
|
|
|
|
2025-11-01 12:04:26 +01:00
|
|
|
eleventyConfig.addPassthroughCopy({'source/art/favicons/**/*.+(ico|png|svg)': '.'});
|
2023-10-25 20:25:09 +02:00
|
|
|
|
2025-11-01 12:04:26 +01:00
|
|
|
eleventyConfig.addPassthroughCopy({'source/code/**/*.js': 'js'});
|
2023-10-25 20:25:09 +02:00
|
|
|
|
2025-11-01 12:04:26 +01:00
|
|
|
eleventyConfig.addPassthroughCopy({'source/data/**/*.json': 'json'});
|
2023-10-25 20:25:09 +02:00
|
|
|
|
2025-11-01 12:04:26 +01:00
|
|
|
eleventyConfig.addPassthroughCopy('vendor');
|
|
|
|
|
eleventyConfig.addPassthroughCopy({'node_modules/bootstrap-icons': 'vendor/bootstrap-icons'});
|
2025-10-27 21:15:32 +01:00
|
|
|
eleventyConfig.addPassthroughCopy({
|
2025-11-01 12:04:26 +01:00
|
|
|
'node_modules/jquery/dist/jquery.min.js': 'vendor/jquery.min.js',
|
|
|
|
|
'node_modules/jquery/dist/jquery.min.map': 'vendor/jquery.min.map'
|
2025-10-27 21:15:32 +01:00
|
|
|
});
|
2025-11-02 17:18:12 +01:00
|
|
|
eleventyConfig.addPassthroughCopy({'node_modules/hippie-script/index.js': 'vendor/hippie-script.js'});
|
2023-10-25 20:25:09 +02:00
|
|
|
|
2025-11-01 12:04:26 +01:00
|
|
|
eleventyConfig.addWatchTarget('./source/style/');
|
2023-10-25 22:22:19 +02:00
|
|
|
|
2023-10-25 20:25:09 +02:00
|
|
|
return {
|
|
|
|
|
dir: {
|
2025-11-01 12:04:26 +01:00
|
|
|
input: 'source/screens',
|
|
|
|
|
output: 'build',
|
|
|
|
|
includes: '../templates',
|
|
|
|
|
data: '../data'
|
2023-10-25 20:25:09 +02:00
|
|
|
},
|
2025-11-01 12:04:26 +01:00
|
|
|
templateFormats: ['html', 'liquid', 'njk', 'md']
|
2024-08-11 12:05:18 +02:00
|
|
|
// pathPrefix: './demo/'
|
2025-10-26 15:19:14 +01:00
|
|
|
};
|
2026-03-04 19:22:55 +01:00
|
|
|
}
|