hippie/.eleventy.js
sthag be425e8be5 feat: change log output and template structure
- new global variable debugMode
- demo templates are now based on hippie defaults joined with template inheritance
- add log macros
- new function logAdd()
- log uses global state
2024-08-10 15:25:41 +02:00

42 lines
1 KiB
JavaScript

module.exports = function (eleventyConfig) {
eleventyConfig.setNunjucksEnvironmentOptions({
// throwOnUndefined: true,
trimBlocks: true
});
eleventyConfig.addGlobalData("permalink", () => {
return (data) => `${data.page.filePathStem}.${data.page.outputFileExtension}`;
});
eleventyConfig.addGlobalData("hippie", {
pageBase: './',
brand: 'hippie',
titlePrefix: '',
titlePostfix: ' - HIPPIE',
debugMode: true
});
eleventyConfig.addPassthroughCopy({"source/art/images": "art"});
eleventyConfig.addPassthroughCopy({"source/art/favicons/**/*.+(ico|png|svg)": "."});
eleventyConfig.addPassthroughCopy({"source/code/**/*.js": "js"});
eleventyConfig.addPassthroughCopy({"source/data/**/*.json": "json"});
eleventyConfig.addPassthroughCopy("vendor");
eleventyConfig.addWatchTarget("./source/style/");
return {
dir: {
input: "source/screens",
output: "build",
includes: "../templates",
data: "../data"
},
markdownTemplateEngine: "njk",
htmlTemplateEngine: "njk",
templateFormats: ["html", "njk", "md"]
}
};