copy german start page to root url
This commit is contained in:
parent
9011b604d2
commit
c8e5dfa8f0
|
@ -1,5 +1,6 @@
|
||||||
const { EleventyHtmlBasePlugin, EleventyI18nPlugin } = require("@11ty/eleventy");
|
const { EleventyHtmlBasePlugin, EleventyI18nPlugin } = require("@11ty/eleventy");
|
||||||
const eleventyNavigationPlugin = require("@11ty/eleventy-navigation");
|
const eleventyNavigationPlugin = require("@11ty/eleventy-navigation");
|
||||||
|
const fs = require('fs');
|
||||||
|
|
||||||
// update this :)
|
// update this :)
|
||||||
const year = 2024;
|
const year = 2024;
|
||||||
|
@ -17,6 +18,18 @@ module.exports = function(eleventyConfig) {
|
||||||
return value.filter(item => item.page.lang === this.page.lang)
|
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 {
|
return {
|
||||||
dir: {
|
dir: {
|
||||||
input: "content",
|
input: "content",
|
||||||
|
|
Loading…
Reference in a new issue