diff --git a/server/static.ts b/server/static.ts index e704de4..4276f98 100644 --- a/server/static.ts +++ b/server/static.ts @@ -4,6 +4,22 @@ import path from "path"; import { storage } from "./storage"; import sharp from "sharp"; +// 15. 9. 2026 (Sebastjan): stran je v keywords vsakemu clanku pisala +// "Volksmusik, Schlager" — tudi Beckerju, Geissensom in Ivanovic. Cevovod ze ve, +// kaj kos je (znacka MUSIC NEWS / STAR NEWS), zato jo zapise v vsebino kot +// marker , enako kot . +// Brez markerja ostane vse kot prej (glasbeno), da starejsi clanki ne nazadujejo. +// Besedilne zaznave namenoma NI: preizkus na 30 clankih jo je zgresil pri +// Fernsehgartnu in Carpendaleju. +function folxGenre(article: any): { words: string[]; section: string } { + const m = //i.exec(String(article?.content || "")); + const badge = (m ? m[1] : "MUSIC NEWS").toUpperCase(); + return badge === "MUSIC NEWS" + ? { words: ["Volksmusik", "Schlager", "Musik News"], section: "Musik News" } + : { words: ["Star News", "Promi News", "Promi"], section: "Star News" }; +} + + function escapeHtml(str: string): string { return str.replace(/&/g, "&").replace(/"/g, """).replace(//g, ">"); } @@ -501,7 +517,8 @@ export function serveStatic(app: Express) { "image": [finalImage], "datePublished": pubDate, "dateModified": modDate, - "articleSection": article.category || "News", + "articleSection": folxGenre(article).section, + "keywords": folxGenre(article).words.join(", "), "author": { "@type": "Organization", "name": article.author || "Folx Music Television", @@ -550,7 +567,7 @@ export function serveStatic(app: Express) { ``, ``, ``, - ``, + ``, ``, `