diff --git a/eleventy.config.js b/eleventy.config.js index 7b7aff0..29ae4f8 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -1,5 +1,6 @@ const { EleventyHtmlBasePlugin, EleventyI18nPlugin } = require("@11ty/eleventy"); const eleventyNavigationPlugin = require("@11ty/eleventy-navigation"); +const fs = require('fs'); // update this :) const year = 2024; @@ -17,6 +18,18 @@ module.exports = function(eleventyConfig) { return value.filter(item => item.page.lang === this.page.lang) }); + // copy german start page to root url + eleventyConfig.on( + "eleventy.after", + async ({ dir, runMode, outputMode }) => { + if (outputMode === "fs") { + fs.copyFile(`${dir.output}/de/index.html`, `${dir.output}/index.html`, (err) => { + if (err) console.log(err); + }); + } + } + ); + return { dir: { input: "content",