naslovnice: fokusna tocka obraza povsod (aktuelles, kategorije, videi, iskanje, clanek + sorodni), skupni pomocnik lib/focal, streznik osvezuje fokusne tocke vsakih 20 minut

This commit is contained in:
claude
2026-08-20 07:15:07 +02:00
parent 2ec7c259c3
commit ca47bc8698
7 changed files with 61 additions and 13 deletions
+12 -5
View File
@@ -75,11 +75,18 @@ export async function registerRoutes(
return res.status(401).json({ message: "Unauthorized" });
};
storage.getArticles().then((articles) => {
analyzeAllArticleImages(articles).catch(err =>
console.log("[focal-point] Analysis skipped:", err.message)
);
});
// Fokusne tocke naslovnic (kje je obraz) — brez njih object-cover obreze na
// sredino in odreze glave. Racunamo ob zagonu IN vsakih 20 minut, da jih
// dobijo tudi clanki, ki jih boti objavijo med tem.
const refreshFocalPoints = () => {
storage.getArticles().then((articles) => {
analyzeAllArticleImages(articles).catch(err =>
console.log("[focal-point] Analysis skipped:", err.message)
);
}).catch(err => console.log("[focal-point] getArticles failed:", err?.message));
};
refreshFocalPoints();
setInterval(refreshFocalPoints, 20 * 60 * 1000);
// ---- SEO: robots.txt, sitemap.xml, news sitemap, RSS ----
// Rubrike z onemusic.news imajo isto besedilo kot tam, zato jih ne oddajamo