diff --git a/client/src/pages/video-detail.tsx b/client/src/pages/video-detail.tsx
index 5135534..0fd0054 100644
--- a/client/src/pages/video-detail.tsx
+++ b/client/src/pages/video-detail.tsx
@@ -18,6 +18,8 @@ export interface YtVideo {
durationS: number;
teaser: string;
description: string;
+ descriptionClean?: string;
+ articleUrl?: string | null;
chapters: { t: string; label: string }[];
tags: string[];
previewUrl: string | null;
@@ -141,11 +143,21 @@ export default function VideoDetailPage() {
)}
- {v.description && (
+ {v.articleUrl && (
+
+ Ganzer Artikel auf folx.tv
+
+ )}
+
+ {(v.descriptionClean || v.description) && (
Zum Video
- {v.description.replace(/\n{3,}/g, "\n\n")}
+ {(v.descriptionClean || v.description).replace(/\n{3,}/g, "\n\n")}
)}
diff --git a/server/static.ts b/server/static.ts
index ab913b2..0bef0cb 100644
--- a/server/static.ts
+++ b/server/static.ts
@@ -131,7 +131,7 @@ export function serveStatic(app: Express) {
const pageUrl = `${canonicalBase}/video/${v.slug}`;
const poster = `${canonicalBase}${v.posterUrl}`;
const desc = (v.teaser || v.shortTitle || v.title).slice(0, 300);
- const longDesc = String(v.description || v.teaser || v.shortTitle)
+ const longDesc = String(v.descriptionClean || v.description || v.teaser || v.shortTitle)
.replace(/https?:\/\/\S+/g, "").replace(/\s+/g, " ").trim().slice(0, 900);
const mins = Math.floor((v.durationS || 0) / 60), secs = (v.durationS || 0) % 60;
const embedUrl = v.embedUrl || `https://www.youtube-nocookie.com/embed/${v.ytId}`;
@@ -181,7 +181,7 @@ export function serveStatic(app: Express) {
// Celoten opis gre v SSR, da ga Google prebere brez JavaScripta.
// Prej je bil v HTML samo naslov in teaser (~320 znakov), ostalo je
// izrisal sele React.
- const descHtml = String(v.description || "")
+ const descHtml = String(v.descriptionClean || v.description || "")
.split(/\n{2,}/)
.map((par: string) => par.trim())
.filter((par: string) => par.length > 2 && !/^https?:\/\//.test(par) && !/^[\u2013\u2014-]{4,}$/.test(par))
@@ -194,6 +194,7 @@ export function serveStatic(app: Express) {
`
${escapeHtml(desc)}
`,
chapterHtml,
`Das ganze Video auf YouTube ansehen
`,
+ v.articleUrl ? `Ganzer Artikel auf folx.tv
` : "",
descHtml ? `Zum Video
${descHtml}` : "",
"",
].join("\n");