hippie/.eleventy.js
sthag a33163d556 feat: Add bootstrap icons dependency
- Add node package for bootstrap icons
- New eleventy config addPassthroughCopy for package files
- Change link to local resource
- Change all node dependencies to production
2025-06-21 14:22:31 +02:00

50 lines
1.3 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,
legacyMode: false
});
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.addPassthroughCopy({"node_modules/bootstrap-icons": "vendor/bootstrap-icons"});
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/'
}
};