diff --git a/server/static.ts b/server/static.ts index 35f28b3..cf007bb 100644 --- a/server/static.ts +++ b/server/static.ts @@ -566,6 +566,48 @@ export function serveStatic(app: Express) { } } + // /rezepte in /videos sta prej vracala canonical na naslovnico, zato ju Google + // ni mogel indeksirati kot samostojni strani (29. 8. 2026). + const SEKCIJE: Record = { + "/rezepte": { + pot: "/rezepte", + naslov: "Rezepte \u2013 Rezept des Tages | Folx Music Television", + opis: "Jeden Tag ein neues Rezept: einfache Gerichte, Klassiker und Ideen f\u00fcr jeden Anlass \u2013 bei FOLX TV.", + }, + "/videos": { + pot: "/videos", + naslov: "Videos \u2013 Schlager und Volksmusik | Folx Music Television", + opis: "Alle Videos von FOLX TV: Interviews, Auftritte und Musik News aus Schlager und Volksmusik.", + }, + }; + const sekPot = url.split("?")[0].split("#")[0].replace(/\/$/, ""); + const sek = SEKCIJE[sekPot]; + if (sek) { + let template = await fs.promises.readFile(indexPath, "utf-8"); + template = stripExistingMeta(template); + const sUrl = `${canonicalBase}${sek.pot}`; + const sImg = `${canonicalBase}/images/og-image.jpg`; + const sTags = [ + ``, + ``, + ``, + ``, + ``, + ``, + ``, + ``, + ``, + ``, + ``, + ``, + ``, + `${escapeHtml(sek.naslov)}`, + ].join("\n "); + template = template.replace(/[^<]*<\/title>/, sTags); + res.status(200).set({ "Content-Type": "text/html" }).end(template); + return; + } + if (url.match(/^\/gallery(\/|$|\?)/)) { let template = await fs.promises.readFile(indexPath, "utf-8"); template = stripExistingMeta(template);