Add misc section with full per-page strings translation support, 88x31 page and bookmarks page.

This commit is contained in:
天クマ 2026-04-21 14:33:42 -03:00
commit 74285e314d
89 changed files with 291 additions and 9 deletions

34
misc/misc.11tydata.js Normal file
View file

@ -0,0 +1,34 @@
const fs = require("fs");
const path = require("path");
module.exports = {
eleventyComputed: {
t: (data) => {
const dir = path.dirname(data.page.inputPath);
const file = path.join(dir, `${data.langKey}.json`);
if (fs.existsSync(file)) {
return JSON.parse(fs.readFileSync(file, "utf-8"));
}
return {};
},
c: (data) => {
const dir = path.dirname(data.page.inputPath);
const file = path.join(dir, `common.json`);
if (fs.existsSync(file)) {
return JSON.parse(fs.readFileSync(file, "utf-8"));
}
return {};
}
},
languages: ["en", "pt"],
permalink: data => {
return `/${data.langKey}/misc/${data.page.fileSlug}/`;
},
tags: "misc"
};