ese-website/eleventy.config.js
2024-09-14 10:59:22 +02:00

30 lines
778 B
JavaScript

const { EleventyHtmlBasePlugin, EleventyI18nPlugin } = require("@11ty/eleventy");
const eleventyNavigationPlugin = require("@11ty/eleventy-navigation");
// update this :)
const year = 2024;
module.exports = function(eleventyConfig) {
eleventyConfig.addPlugin(EleventyHtmlBasePlugin);
eleventyConfig.addPlugin(eleventyNavigationPlugin);
eleventyConfig.addPlugin(EleventyI18nPlugin, {
defaultLanguage: "de",
});
eleventyConfig.addGlobalData("year", year);
eleventyConfig.addFilter("pageLang", function(value) {
return value.filter(item => item.page.lang === this.page.lang)
});
return {
dir: {
input: "content",
includes: "../_includes",
layouts: "../_layouts",
data: "../_data",
},
pathPrefix: `/${year}/`,
}
};