Improve video page descriptions for better search engine visibility
Update meta and Open Graph descriptions to use original video descriptions or a fallback German description for improved SEO and social sharing. Add German locale. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 2cd2c0bc-434c-4bc9-ad3f-b99d3897a0d1 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8cc42625-c1f5-4e43-99bd-77f2c4dedee2/2cd2c0bc-434c-4bc9-ad3f-b99d3897a0d1/OdlP8Wj
This commit is contained in:
parent
967aa3025c
commit
3ade22e7a1
@ -152,10 +152,13 @@ export default function VideoPage() {
|
||||
// Update page title
|
||||
document.title = `${currentVideo.title} | go4.video`;
|
||||
|
||||
// Update meta description
|
||||
// Update meta description with original or rich content
|
||||
const metaDescription = document.querySelector('meta[name="description"]');
|
||||
if (metaDescription) {
|
||||
metaDescription.setAttribute('content', currentVideo.description || `Watch ${currentVideo.title} on go4.video`);
|
||||
const descriptionContent = currentVideo.description && currentVideo.description.trim() !== ''
|
||||
? currentVideo.description
|
||||
: `Schauen Sie sich "${currentVideo.title}" auf go4.video an. Professionelle Video-Streaming-Plattform mit exklusivem Content von FOLX STADL, Geschichte des Liedes und weiteren Premium-Inhalten.`;
|
||||
metaDescription.setAttribute('content', descriptionContent);
|
||||
}
|
||||
|
||||
// Update Open Graph tags
|
||||
@ -170,7 +173,13 @@ export default function VideoPage() {
|
||||
};
|
||||
|
||||
updateMetaTag('og:title', currentVideo.title);
|
||||
updateMetaTag('og:description', currentVideo.description || `Watch ${currentVideo.title} on go4.video`);
|
||||
|
||||
// Use original description if available, otherwise create rich description
|
||||
const richDescription = currentVideo.description && currentVideo.description.trim() !== ''
|
||||
? currentVideo.description
|
||||
: `Schauen Sie sich "${currentVideo.title}" auf go4.video an. Professionelle Video-Streaming-Plattform mit exklusivem Content von FOLX STADL, Geschichte des Liedes und weiteren Premium-Inhalten.`;
|
||||
|
||||
updateMetaTag('og:description', richDescription);
|
||||
// Uporabljan cache-busting parameter za social media refresh
|
||||
const timestamp = new Date().getTime();
|
||||
const socialThumbnail = `${window.location.origin}/api/video-thumbnail/${currentVideo.id}?v=${timestamp}`;
|
||||
@ -183,6 +192,7 @@ export default function VideoPage() {
|
||||
updateMetaTag('og:type', 'video.other');
|
||||
updateMetaTag('og:video:duration', currentVideo.duration.toString());
|
||||
updateMetaTag('og:site_name', 'go4.video');
|
||||
updateMetaTag('og:locale', 'de_DE');
|
||||
|
||||
// Update Twitter Card tags
|
||||
const updateTwitterTag = (name: string, content: string) => {
|
||||
@ -197,7 +207,7 @@ export default function VideoPage() {
|
||||
|
||||
updateTwitterTag('twitter:card', 'summary_large_image');
|
||||
updateTwitterTag('twitter:title', currentVideo.title);
|
||||
updateTwitterTag('twitter:description', currentVideo.description || `Watch ${currentVideo.title} on go4.video`);
|
||||
updateTwitterTag('twitter:description', richDescription);
|
||||
updateTwitterTag('twitter:image', socialThumbnail);
|
||||
updateTwitterTag('twitter:image:alt', `${currentVideo.title} - go4.video`);
|
||||
updateTwitterTag('twitter:site', '@go4video');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user