diff --git a/_includes/footer.njk b/_includes/footer.njk index 36d8766..5cd1698 100644 --- a/_includes/footer.njk +++ b/_includes/footer.njk @@ -2,7 +2,7 @@
[language switcher]
diff --git a/_includes/header.njk b/_includes/header.njk index 4519008..8e809ff 100644 --- a/_includes/header.njk +++ b/_includes/header.njk @@ -1,6 +1,6 @@
- ESE Logo + ESE Logo
diff --git a/content/de/accessibility.md b/content/de/accessibility.md new file mode 100644 index 0000000..9efd435 --- /dev/null +++ b/content/de/accessibility.md @@ -0,0 +1,6 @@ +--- +layout: page.njk +title: Barrierefreiheit +tags: footerNav +--- +# Barrierefreiheit diff --git a/content/de/campus.md b/content/de/campus.md new file mode 100644 index 0000000..031c07d --- /dev/null +++ b/content/de/campus.md @@ -0,0 +1,7 @@ +--- +layout: page.njk +title: Campus & Fakultät +tags: mainNav +--- +# Campus & Fakultät + diff --git a/content/de/de.json b/content/de/de.json new file mode 100644 index 0000000..8885221 --- /dev/null +++ b/content/de/de.json @@ -0,0 +1,3 @@ +{ + "lang": "de" +} diff --git a/content/de/faq.md b/content/de/faq.md new file mode 100644 index 0000000..99445f7 --- /dev/null +++ b/content/de/faq.md @@ -0,0 +1,6 @@ +--- +layout: page.njk +title: FAQ +tags: mainNav +--- +# Häufig gestellte Fragen diff --git a/content/de/first-steps.md b/content/de/first-steps.md new file mode 100644 index 0000000..4f8a3e4 --- /dev/null +++ b/content/de/first-steps.md @@ -0,0 +1,7 @@ +--- +layout: page.njk +title: Erste Schritte +tags: mainNav +--- +# Erste Schritte + diff --git a/content/de/guidelines.md b/content/de/guidelines.md new file mode 100644 index 0000000..a05f14d --- /dev/null +++ b/content/de/guidelines.md @@ -0,0 +1,6 @@ +--- +layout: page.njk +title: Community-Leitlinien +tags: footerNav +--- +# Community-Leitlinien diff --git a/content/de/imprint.md b/content/de/imprint.md new file mode 100644 index 0000000..a1be408 --- /dev/null +++ b/content/de/imprint.md @@ -0,0 +1,6 @@ +--- +layout: page.njk +title: Impressum +tags: footerNav +--- +# Impressum diff --git a/content/de/index.md b/content/de/index.md new file mode 100644 index 0000000..02b2c22 --- /dev/null +++ b/content/de/index.md @@ -0,0 +1,4 @@ +--- +layout: page.njk +--- +# Hallo Welt :) diff --git a/content/de/privacy.md b/content/de/privacy.md new file mode 100644 index 0000000..04a4fe1 --- /dev/null +++ b/content/de/privacy.md @@ -0,0 +1,6 @@ +--- +layout: page.njk +title: Datenschutz +tags: footerNav +--- +# Datenschutz diff --git a/content/de/program.md b/content/de/program.md new file mode 100644 index 0000000..88d9187 --- /dev/null +++ b/content/de/program.md @@ -0,0 +1,6 @@ +--- +layout: page.njk +title: Programm +tags: mainNav +--- +# Programm diff --git a/content/accessibility.md b/content/en/accessibility.md similarity index 100% rename from content/accessibility.md rename to content/en/accessibility.md diff --git a/content/campus.md b/content/en/campus.md similarity index 100% rename from content/campus.md rename to content/en/campus.md diff --git a/content/en/en.json b/content/en/en.json new file mode 100644 index 0000000..e791844 --- /dev/null +++ b/content/en/en.json @@ -0,0 +1,3 @@ +{ + "lang": "en" +} diff --git a/content/faq.md b/content/en/faq.md similarity index 100% rename from content/faq.md rename to content/en/faq.md diff --git a/content/first-steps.md b/content/en/first-steps.md similarity index 100% rename from content/first-steps.md rename to content/en/first-steps.md diff --git a/content/guidelines.md b/content/en/guidelines.md similarity index 100% rename from content/guidelines.md rename to content/en/guidelines.md diff --git a/content/imprint.md b/content/en/imprint.md similarity index 100% rename from content/imprint.md rename to content/en/imprint.md diff --git a/content/index.md b/content/en/index.md similarity index 100% rename from content/index.md rename to content/en/index.md diff --git a/content/privacy.md b/content/en/privacy.md similarity index 100% rename from content/privacy.md rename to content/en/privacy.md diff --git a/content/program.md b/content/en/program.md similarity index 100% rename from content/program.md rename to content/en/program.md diff --git a/eleventy.config.js b/eleventy.config.js index d750560..7b7aff0 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -1,4 +1,4 @@ -const { EleventyHtmlBasePlugin } = require("@11ty/eleventy"); +const { EleventyHtmlBasePlugin, EleventyI18nPlugin } = require("@11ty/eleventy"); const eleventyNavigationPlugin = require("@11ty/eleventy-navigation"); // update this :) @@ -7,9 +7,16 @@ 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",