From 120fd478e803c3546d35052fc6f5ec99e873df03 Mon Sep 17 00:00:00 2001 From: sebastjanartic <45803536-sebastjanartic@users.noreply.replit.com> Date: Fri, 13 Feb 2026 17:39:39 +0000 Subject: [PATCH] Improve page titles and meta descriptions for better search engine visibility Updates titles, meta descriptions, and Open Graph tags across various pages and API responses for improved SEO and language consistency. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 401e2ec0-e00d-4f10-9d0e-60f3d479f9a5 Replit-Commit-Checkpoint-Type: intermediate_checkpoint Replit-Commit-Event-Id: b39b5688-81f4-4af3-b05c-9c9e8c4350ff Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/60d372ff-2c10-46c7-b01b-10c3435136b0/401e2ec0-e00d-4f10-9d0e-60f3d479f9a5/qFrskyV --- client/index.html | 20 +- client/src/pages/FolxStadlPage.tsx | 8 + client/src/pages/GeschichteLiedPage.tsx | 8 + client/src/pages/GipfelstammtischPage.tsx | 8 + client/src/pages/LivePage.tsx | 8 +- client/src/pages/PlayerPage.tsx | 4 +- client/src/pages/VideoPage.tsx | 14 +- client/src/pages/home.tsx | 8 + server/routes.ts | 301 ++++++++++++++++++++-- 9 files changed, 338 insertions(+), 41 deletions(-) diff --git a/client/index.html b/client/index.html index a579294..5be0427 100644 --- a/client/index.html +++ b/client/index.html @@ -3,7 +3,7 @@ - video.folx.tv – FOLX.TV Video Platform + Folx TV - Video - + - - + + @@ -34,15 +34,15 @@ - + - - + + - + @@ -95,9 +95,9 @@ "@context": "https://schema.org", "@type": "WebSite", "name": "video.folx.tv", - "alternateName": "FOLX.TV Video Platform", + "alternateName": "Folx TV - Video", "url": "https://video.folx.tv", - "description": "Deutsche Video Streaming Plattform mit Musik, Unterhaltung und Live-Streaming", + "description": "Folx TV - Nummer 1 in Europa für Volksmusik und Schlager. Video Streaming Plattform mit Musik, Unterhaltung und Live-Streaming.", "inLanguage": "de", "potentialAction": { "@type": "SearchAction", diff --git a/client/src/pages/FolxStadlPage.tsx b/client/src/pages/FolxStadlPage.tsx index eaf4450..a893970 100644 --- a/client/src/pages/FolxStadlPage.tsx +++ b/client/src/pages/FolxStadlPage.tsx @@ -79,6 +79,14 @@ export default function FolxStadlPage() { } }; + useEffect(() => { + document.title = 'FOLX STADL - Die große Volksmusik Show | Folx TV - Video'; + const metaDescription = document.querySelector('meta[name="description"]'); + if (metaDescription) { + metaDescription.setAttribute('content', 'FOLX STADL - Die beliebte Volksmusik- und Schlagershow. Mit Angela Wiedl, Oswald Sattler, Die Grubertaler und vielen mehr. Folx TV - Nummer 1 in Europa für Volksmusik und Schlager.'); + } + }, []); + if (isLoading) { return (
diff --git a/client/src/pages/GeschichteLiedPage.tsx b/client/src/pages/GeschichteLiedPage.tsx index c159dd0..196e421 100644 --- a/client/src/pages/GeschichteLiedPage.tsx +++ b/client/src/pages/GeschichteLiedPage.tsx @@ -81,6 +81,14 @@ export default function GeschichteLiedPage() { } }; + useEffect(() => { + document.title = 'Die Geschichte des Liedes - Musikdokumentation | Folx TV - Video'; + const metaDescription = document.querySelector('meta[name="description"]'); + if (metaDescription) { + metaDescription.setAttribute('content', 'Die Geschichte des Liedes - Entdecken Sie die Entstehung der beliebtesten Volksmusik- und Schlagerlieder. Folx TV - Nummer 1 in Europa für Volksmusik und Schlager.'); + } + }, []); + if (isLoading) { return (
diff --git a/client/src/pages/GipfelstammtischPage.tsx b/client/src/pages/GipfelstammtischPage.tsx index ec65322..23ac469 100644 --- a/client/src/pages/GipfelstammtischPage.tsx +++ b/client/src/pages/GipfelstammtischPage.tsx @@ -81,6 +81,14 @@ export default function GipfelstammtischPage() { } }; + useEffect(() => { + document.title = 'Gipfelstammtisch - Volksmusik Talkshow | Folx TV - Video'; + const metaDescription = document.querySelector('meta[name="description"]'); + if (metaDescription) { + metaDescription.setAttribute('content', 'Gipfelstammtisch - Die gemütliche Volksmusik-Talkshow. Gespräche mit Stars der Volksmusik- und Schlagerszene. Folx TV - Nummer 1 in Europa für Volksmusik und Schlager.'); + } + }, []); + if (isLoading) { return (
diff --git a/client/src/pages/LivePage.tsx b/client/src/pages/LivePage.tsx index 117feb0..bb1d591 100644 --- a/client/src/pages/LivePage.tsx +++ b/client/src/pages/LivePage.tsx @@ -38,11 +38,11 @@ export default function LivePage() { useEffect(() => { // Set page meta tags - document.title = 'LIVE Stream | video.folx.tv'; + document.title = 'LIVE Stream | Folx TV - Video'; const metaDescription = document.querySelector('meta[name="description"]'); if (metaDescription) { - metaDescription.setAttribute('content', 'Live stream on video.folx.tv - watch exclusive content in real time.'); + metaDescription.setAttribute('content', 'Live Stream auf Folx TV - Schauen Sie exklusive Inhalte in Echtzeit. Folx TV - Nummer 1 in Europa für Volksmusik und Schlager.'); } const updateMetaTag = (property: string, content: string) => { @@ -55,8 +55,8 @@ export default function LivePage() { meta.setAttribute('content', content); }; - updateMetaTag('og:title', 'LIVE Stream - video.folx.tv'); - updateMetaTag('og:description', 'Live stream on video.folx.tv - watch exclusive content in real time.'); + updateMetaTag('og:title', 'LIVE Stream | Folx TV - Video'); + updateMetaTag('og:description', 'Live Stream auf Folx TV - Schauen Sie exklusive Inhalte in Echtzeit. Nummer 1 in Europa für Volksmusik und Schlager.'); updateMetaTag('og:type', 'video.other'); }, []); diff --git a/client/src/pages/PlayerPage.tsx b/client/src/pages/PlayerPage.tsx index 74eb1e8..db6de91 100644 --- a/client/src/pages/PlayerPage.tsx +++ b/client/src/pages/PlayerPage.tsx @@ -19,11 +19,11 @@ export default function PlayerPage() { const videos = (videosData && Array.isArray((videosData as any).videos)) ? (videosData as any).videos : []; useEffect(() => { - document.title = 'Professional Player | video.folx.tv'; + document.title = 'Professional Player | Folx TV - Video'; const metaDescription = document.querySelector('meta[name="description"]'); if (metaDescription) { - metaDescription.setAttribute('content', 'Professional Video Player mit Streaming-Funktionen auf video.folx.tv'); + metaDescription.setAttribute('content', 'Professioneller Video Player mit Overlay Graphics und Streaming-Funktionen. Folx TV - Nummer 1 in Europa für Volksmusik und Schlager.'); } }, []); diff --git a/client/src/pages/VideoPage.tsx b/client/src/pages/VideoPage.tsx index f84b6c4..0c1aef4 100644 --- a/client/src/pages/VideoPage.tsx +++ b/client/src/pages/VideoPage.tsx @@ -198,14 +198,22 @@ export default function VideoPage() { useEffect(() => { if (currentVideo) { // Update page title - document.title = `${currentVideo.title} | video.folx.tv`; + document.title = `${currentVideo.title} | Folx TV - Video`; // Update meta description with original or rich content const metaDescription = document.querySelector('meta[name="description"]'); if (metaDescription) { const descriptionContent = currentVideo.description && currentVideo.description.trim() !== '' ? currentVideo.description - : `${currentVideo.title} - Professionelle Video-Streaming-Plattform mit exklusivem Content von FOLX STADL, Geschichte des Liedes und weiteren Premium-Inhalten auf video.folx.tv.`; + : (() => { + const t = currentVideo.title || ''; + let a = ''; + if (t.includes('–')) a = t.split('–')[0].trim(); + else if (t.includes(' - ')) a = t.split(' - ')[0].trim(); + return a + ? `${t} - Jetzt ansehen auf Folx TV. Nummer 1 in Europa für Volksmusik und Schlager.` + : `${t} - Jetzt ansehen auf Folx TV. Nummer 1 in Europa für Volksmusik und Schlager.`; + })(); metaDescription.setAttribute('content', descriptionContent); } @@ -225,7 +233,7 @@ export default function VideoPage() { // Use original description if available, otherwise create rich description const richDescription = currentVideo.description && currentVideo.description.trim() !== '' ? currentVideo.description - : `${currentVideo.title} - Professionelle Video-Streaming-Plattform mit exklusivem Content von FOLX STADL, Geschichte des Liedes und weiteren Premium-Inhalten auf video.folx.tv.`; + : `${currentVideo.title} - Jetzt ansehen auf Folx TV. Nummer 1 in Europa für Volksmusik und Schlager.`; updateMetaTag('og:description', richDescription); // For social media, use direct Bunny.net thumbnail if available, otherwise fallback to our endpoint diff --git a/client/src/pages/home.tsx b/client/src/pages/home.tsx index 458f4b0..f83e56c 100644 --- a/client/src/pages/home.tsx +++ b/client/src/pages/home.tsx @@ -50,6 +50,14 @@ export default function Home() { refetchInterval: 120000 }); + useEffect(() => { + document.title = 'Folx TV - Video'; + const metaDescription = document.querySelector('meta[name="description"]'); + if (metaDescription) { + metaDescription.setAttribute('content', 'Folx TV - Nummer 1 in Europa für Volksmusik und Schlager. Video Streaming Plattform mit Musik, Unterhaltung und Live-Streaming.'); + } + }, []); + // Update videos when new data comes in useEffect(() => { if (videosResponse) { diff --git a/server/routes.ts b/server/routes.ts index 583942b..e805085 100644 --- a/server/routes.ts +++ b/server/routes.ts @@ -146,12 +146,63 @@ export async function registerRoutes(app: Express): Promise { .replace(/format=webp/gi, 'format=jpg'); } + // Extract artist name from title (format: "Artist – Song" or "Artist - Song") + const titleStr = video.title || ''; + let artistName = ''; + let songName = titleStr; + if (titleStr.includes('–')) { + const parts = titleStr.split('–'); + artistName = parts[0].trim(); + songName = parts.slice(1).join('–').trim(); + } else if (titleStr.includes(' - ')) { + const parts = titleStr.split(' - '); + artistName = parts[0].trim(); + songName = parts.slice(1).join(' - ').trim(); + } + // Clean description for meta tags const description = video.description ? video.description.substring(0, 200).replace(/[<>"']/g, '') - : `Schauen Sie ${video.title} auf video.folx.tv - Die beste Musik`; + : artistName + ? `${artistName} – ${songName}. Jetzt ansehen auf Folx TV - Nummer 1 in Europa für Volksmusik und Schlager.` + : `${titleStr} auf Folx TV ansehen - Nummer 1 in Europa für Volksmusik und Schlager.`; - const title = video.title || 'video.folx.tv'; + const title = video.title || 'Folx TV - Video'; + const keywords = artistName + ? `${artistName}, ${songName}, Volksmusik, Schlager, Folx TV, Musikvideo` + : `${titleStr}, Volksmusik, Schlager, Folx TV`; + + // JSON-LD structured data for video with artist + const jsonLd: any = { + "@context": "https://schema.org", + "@type": "VideoObject", + "name": title, + "description": description, + "thumbnailUrl": thumbnailUrl, + "uploadDate": video.createdAt ? new Date(video.createdAt).toISOString() : new Date().toISOString(), + "duration": video.duration ? `PT${Math.floor(video.duration / 60)}M${video.duration % 60}S` : undefined, + "contentUrl": videoUrl, + "embedUrl": videoUrl, + "interactionStatistic": { + "@type": "InteractionCounter", + "interactionType": "https://schema.org/WatchAction", + "userInteractionCount": video.views || 0 + }, + "publisher": { + "@type": "Organization", + "name": "FOLX.TV", + "url": "https://folx.tv" + }, + "inLanguage": "de" + }; + + if (artistName) { + jsonLd["byArtist"] = { + "@type": "MusicGroup", + "name": artistName + }; + jsonLd["@type"] = "MusicVideoObject"; + } // Return HTML page with OG tags for crawlers const html = ` @@ -159,9 +210,10 @@ export async function registerRoutes(app: Express): Promise { - ${title} - video.folx.tv + ${title} | Folx TV - Video + + - @@ -171,21 +223,22 @@ export async function registerRoutes(app: Express): Promise { - + - +

${title}

+ ${artistName ? `

Interpret: ${artistName}

` : ''}

${description}

-

Watch on video.folx.tv

+

Jetzt ansehen auf Folx TV

`; @@ -291,8 +344,8 @@ export async function registerRoutes(app: Express): Promise { const baseUrl = 'https://video.folx.tv'; const pageUrl = `${baseUrl}/player`; - const title = 'Professional Player - video.folx.tv'; - const description = 'Professioneller Video Player mit MTV-Style Overlay Graphics und Streaming-Funktionen auf video.folx.tv'; + const title = 'Professional Player - Folx TV - Video'; + const description = 'Professioneller Video Player mit Overlay Graphics und Streaming-Funktionen. Folx TV - Nummer 1 in Europa für Volksmusik und Schlager.'; const imageUrl = `${baseUrl}/images/logo.svg`; const html = ` @@ -348,8 +401,8 @@ export async function registerRoutes(app: Express): Promise { const baseUrl = 'https://video.folx.tv'; const pageUrl = `${baseUrl}/live`; - const title = 'LIVE Stream - video.folx.tv'; - const description = 'Live Stream auf video.folx.tv - Schauen Sie exklusive Inhalte in Echtzeit. FOLX TV Live Streaming rund um die Uhr.'; + const title = 'LIVE Stream - Folx TV - Video'; + const description = 'Live Stream auf video.folx.tv - Schauen Sie exklusive Inhalte in Echtzeit. Folx TV - Nummer 1 in Europa für Volksmusik und Schlager.'; const imageUrl = `${baseUrl}/images/logo.svg`; const html = ` @@ -386,6 +439,201 @@ export async function registerRoutes(app: Express): Promise { res.send(html); }); + // Server-side meta tags for /folx-stadl page (crawlers + SEO) + app.get('/folx-stadl', async (req, res, next) => { + const userAgent = req.headers['user-agent']?.toLowerCase() || ''; + const crawlers = [ + 'facebookexternalhit', 'facebot', 'twitterbot', 'whatsapp', + 'telegrambot', 'linkedinbot', 'pinterest', 'slackbot', + 'viberbot', 'discordbot', 'applebot', 'googlebot', + 'bingbot', 'yandex', 'baiduspider', 'duckduckbot' + ]; + const isCrawler = crawlers.some(crawler => userAgent.includes(crawler)); + if (!isCrawler) return next(); + + const baseUrl = 'https://video.folx.tv'; + const pageUrl = `${baseUrl}/folx-stadl`; + const title = 'FOLX STADL - Die große Volksmusik Show | Folx TV - Video'; + const description = 'FOLX STADL - Die beliebte Volksmusik- und Schlagershow auf Folx TV. Mit Stars wie Angela Wiedl, Oswald Sattler, Die Grubertaler, Kastelruther Spatzen und vielen mehr. Jetzt alle Folgen ansehen!'; + const keywords = 'FOLX STADL, Volksmusik Show, Schlager, Angela Wiedl, Oswald Sattler, Die Grubertaler, Kastelruther Spatzen, Volksmusik TV, Folx TV'; + + const allVideos = await storage.getVideos(600, 0); + const stadlVideos = allVideos.filter(v => v.title.includes('FOLX STADL') || v.title.includes('FOLXSTADL')); + + const html = ` + + + + + ${title} + + + + + + + + + + + + + + + +

${title}

+

${description}

+

Alle FOLX STADL Folgen (${stadlVideos.length} Videos)

+ + +`; + res.set('Content-Type', 'text/html'); + res.send(html); + }); + + // Server-side meta tags for /geschichte-lied page (crawlers + SEO) + app.get('/geschichte-lied', async (req, res, next) => { + const userAgent = req.headers['user-agent']?.toLowerCase() || ''; + const crawlers = [ + 'facebookexternalhit', 'facebot', 'twitterbot', 'whatsapp', + 'telegrambot', 'linkedinbot', 'pinterest', 'slackbot', + 'viberbot', 'discordbot', 'applebot', 'googlebot', + 'bingbot', 'yandex', 'baiduspider', 'duckduckbot' + ]; + const isCrawler = crawlers.some(crawler => userAgent.includes(crawler)); + if (!isCrawler) return next(); + + const baseUrl = 'https://video.folx.tv'; + const pageUrl = `${baseUrl}/geschichte-lied`; + const title = 'Die Geschichte des Liedes - Musikdokumentation | Folx TV - Video'; + const description = 'Die Geschichte des Liedes - Entdecken Sie die Entstehung und Hintergründe der beliebtesten Volksmusik- und Schlagerlieder. Eine einzigartige Musikdokumentation auf Folx TV.'; + const keywords = 'Geschichte des Liedes, Musikdokumentation, Volksmusik Geschichte, Schlager Historie, Liedgeschichte, Folx TV, Musiksendung'; + + const allVideos = await storage.getVideos(600, 0); + const geschichteVideos = allVideos.filter(v => v.title.includes('Geschichte des Liedes')); + + const html = ` + + + + + ${title} + + + + + + + + + + + + + + + +

${title}

+

${description}

+

Alle Folgen (${geschichteVideos.length} Videos)

+
    ${geschichteVideos.map(v => `
  • ${v.title}
  • `).join('')}
+ +`; + res.set('Content-Type', 'text/html'); + res.send(html); + }); + + // Server-side meta tags for /gipfelstammtisch page (crawlers + SEO) + app.get('/gipfelstammtisch', async (req, res, next) => { + const userAgent = req.headers['user-agent']?.toLowerCase() || ''; + const crawlers = [ + 'facebookexternalhit', 'facebot', 'twitterbot', 'whatsapp', + 'telegrambot', 'linkedinbot', 'pinterest', 'slackbot', + 'viberbot', 'discordbot', 'applebot', 'googlebot', + 'bingbot', 'yandex', 'baiduspider', 'duckduckbot' + ]; + const isCrawler = crawlers.some(crawler => userAgent.includes(crawler)); + if (!isCrawler) return next(); + + const baseUrl = 'https://video.folx.tv'; + const pageUrl = `${baseUrl}/gipfelstammtisch`; + const title = 'Gipfelstammtisch - Volksmusik Talkshow | Folx TV - Video'; + const description = 'Gipfelstammtisch - Die gemütliche Volksmusik-Talkshow auf Folx TV. Gespräche mit Stars der Volksmusik- und Schlagerszene in einzigartiger Alpenatmosphäre. Jetzt alle Folgen ansehen!'; + const keywords = 'Gipfelstammtisch, Volksmusik Talkshow, Schlager Talk, Alpen, Volksmusik Stars, Folx TV, Musiksendung'; + + const allVideos = await storage.getVideos(600, 0); + const gipfelVideos = allVideos.filter(v => v.title.toLowerCase().includes('gipfelstammtisch')); + + const html = ` + + + + + ${title} + + + + + + + + + + + + + + + +

${title}

+

${description}

+

Alle Folgen (${gipfelVideos.length} Videos)

+ + +`; + res.set('Content-Type', 'text/html'); + res.send(html); + }); + // Sitemap.xml for SEO app.get("/sitemap.xml", async (req, res) => { try { @@ -411,16 +659,6 @@ export async function registerRoutes(app: Express): Promise { daily 1.0 - - ${baseUrl}/live - always - 0.9 - - - ${baseUrl}/player - weekly - 0.7 - ${baseUrl}/folx-stadl weekly @@ -442,9 +680,26 @@ export async function registerRoutes(app: Express): Promise { const shortId = video.id.replace(/-/g, '').substring(0, 8); const lastmod = video.createdAt ? new Date(video.createdAt).toISOString().split('T')[0] : new Date().toISOString().split('T')[0]; const safeTitle = escapeXml(video.title); - const safeDescription = escapeXml(video.description || video.title); const safeThumbnail = escapeXml(video.thumbnailUrl || ''); + // Extract artist for richer description + const titleStr = video.title || ''; + let artist = ''; + let song = titleStr; + if (titleStr.includes('–')) { + artist = titleStr.split('–')[0].trim(); + song = titleStr.split('–').slice(1).join('–').trim(); + } else if (titleStr.includes(' - ')) { + artist = titleStr.split(' - ')[0].trim(); + song = titleStr.split(' - ').slice(1).join(' - ').trim(); + } + + const safeDescription = escapeXml( + video.description || + (artist ? `${artist} – ${song}. Volksmusik und Schlager auf Folx TV - Nummer 1 in Europa.` : `${titleStr} auf Folx TV ansehen.`) + ); + const safeTags = artist ? `${escapeXml(artist)}VolksmusikSchlagerFolx TV` : 'VolksmusikSchlagerFolx TV'; + xml += ` ${baseUrl}/video/${shortId} ${lastmod} @@ -455,6 +710,8 @@ export async function registerRoutes(app: Express): Promise { ${safeTitle} ${safeDescription} ${video.duration || 0} + yes + ${safeTags} `;