feat: résoudre le contenu par langue via Eleventy
This commit is contained in:
@@ -1,4 +1,10 @@
|
|||||||
module.exports = function(eleventyConfig) {
|
module.exports = function(eleventyConfig) {
|
||||||
|
// Locale-aware content: `t` resolves to the content bundle for the page's locale (fr by default)
|
||||||
|
eleventyConfig.addGlobalData("eleventyComputed", {
|
||||||
|
locale: (data) => data.locale || "fr",
|
||||||
|
t: (data) => data.i18n[data.locale || "fr"]
|
||||||
|
});
|
||||||
|
|
||||||
// Copy assets folders to output
|
// Copy assets folders to output
|
||||||
eleventyConfig.addPassthroughCopy("src/assets");
|
eleventyConfig.addPassthroughCopy("src/assets");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user