udpated users

This commit is contained in:
Nuno Coração
2025-07-11 10:35:49 +01:00
parent 871b6087f3
commit 0e3cbbb150
144 changed files with 157 additions and 101 deletions

View File

@@ -123,18 +123,19 @@ async function translateFrontMatterTags(block, targetLang, tags) {
await fs.access(dir);
} catch {
await fs.mkdir(dir);
console.log(i, user.title, dir);
await fs.writeFile(dir + "/index.md", userMDFile);
for (const lang of targetLangs) {
const content = await translateFrontMatterTags(userMDFile, lang, user.tags);
await fs.writeFile(dir + `/index.${lang}.md`, content);
}
await page.goto(user.url);
await page.screenshot({ path: dir + "/feature.jpg", type: "webp", quality: 50 });
}
console.log(i, user.title, dir);
await fs.writeFile(dir + "/index.md", userMDFile);
for (const lang of targetLangs) {
const content = await translateFrontMatterTags(userMDFile, lang, user.tags);
await fs.writeFile(dir + `/index.${lang}.md`, content);
}
await page.goto(user.url);
await page.screenshot({ path: dir + "/feature.jpg", type: "webp", quality: 50 });
}
await browser.close();
})();