${escapeHtml(v.shortTitle)}
`, @@ -183,6 +194,7 @@ export function serveStatic(app: Express) { `${escapeHtml(desc)}
`, chapterHtml, `Das ganze Video auf YouTube ansehen
`, + descHtml ? `diff --git a/server/static.ts b/server/static.ts index e46fa67..3e1a92f 100644 --- a/server/static.ts +++ b/server/static.ts @@ -131,13 +131,15 @@ 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) + .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}`; const videoLd = { "@context": "https://schema.org", "@type": "VideoObject", "name": v.shortTitle, - "description": desc, + "description": longDesc || desc, "thumbnailUrl": [poster], "uploadDate": v.publishedAt, "duration": `PT${mins}M${secs}S`, @@ -176,6 +178,15 @@ export function serveStatic(app: Express) { const chapterHtml = (v.chapters || []).length ? `
${escapeHtml(par).replace(/\n/g, "
")}
${escapeHtml(desc)}
`, chapterHtml, `Das ganze Video auf YouTube ansehen
`, + descHtml ? `