hippie/.eleventy.js
sthag c18ed30b74 feat!: move every layout to demo folder
- source/screens is now free for user files
- rename demo templates to their equivalent sources
- add demo maintenance template
- demo templates use html base element
2024-08-11 12:05:18 +02:00

48 lines
1.2 KiB
JavaScript

module.exports = function (eleventyConfig) {
// eleventyConfig.addPlugin(EleventyHtmlBasePlugin);
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',
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"],
// pathPrefix: './demo/'
}
};