@@ -1,6 +1,6 @@
|
|||||||
const pug = require("pug");
|
import pug from "pug";
|
||||||
|
|
||||||
module.exports = function (eleventyConfig) {
|
export default function (eleventyConfig) {
|
||||||
eleventyConfig.addPassthroughCopy("src/assets/img");
|
eleventyConfig.addPassthroughCopy("src/assets/img");
|
||||||
|
|
||||||
eleventyConfig.addExtension("pug", {
|
eleventyConfig.addExtension("pug", {
|
||||||
@@ -21,4 +21,4 @@ module.exports = function (eleventyConfig) {
|
|||||||
htmlTemplateEngine: "pug",
|
htmlTemplateEngine: "pug",
|
||||||
markdownTemplateEngine: "pug",
|
markdownTemplateEngine: "pug",
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
+2
-1
@@ -12,5 +12,6 @@
|
|||||||
"@11ty/eleventy": "^3.0.0",
|
"@11ty/eleventy": "^3.0.0",
|
||||||
"pug": "^3.0.3",
|
"pug": "^3.0.3",
|
||||||
"tailwindcss": "^3.4.10"
|
"tailwindcss": "^3.4.10"
|
||||||
}
|
},
|
||||||
|
"type": "module"
|
||||||
}
|
}
|
||||||
|
|||||||
+7
-4
@@ -1,7 +1,10 @@
|
|||||||
const fs = require("fs");
|
import fs from "node:fs";
|
||||||
const path = require("path");
|
import path from "node:path";
|
||||||
|
import { fileURLToPath } from "node:url";
|
||||||
|
|
||||||
module.exports = function () {
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||||
|
|
||||||
|
export default function () {
|
||||||
const localesDir = path.join(__dirname, "..", "locales");
|
const localesDir = path.join(__dirname, "..", "locales");
|
||||||
const dict = {};
|
const dict = {};
|
||||||
for (const file of fs.readdirSync(localesDir)) {
|
for (const file of fs.readdirSync(localesDir)) {
|
||||||
@@ -10,4 +13,4 @@ module.exports = function () {
|
|||||||
dict[locale] = JSON.parse(fs.readFileSync(path.join(localesDir, file), "utf8"));
|
dict[locale] = JSON.parse(fs.readFileSync(path.join(localesDir, file), "utf8"));
|
||||||
}
|
}
|
||||||
return dict;
|
return dict;
|
||||||
};
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user