setup i18n
This commit is contained in:
parent
5dff188fa4
commit
61415ce5a7
23 changed files with 71 additions and 4 deletions
|
@ -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",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue