From 3e920e9108f2d25000406a4eb230946355fad3bb Mon Sep 17 00:00:00 2001 From: Sabda Yagra Date: Wed, 8 Oct 2025 11:34:15 +0700 Subject: [PATCH] fix: fixing og page detail video --- .../(public)/video/detail/[slug]/page.tsx | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/app/[locale]/(public)/video/detail/[slug]/page.tsx b/app/[locale]/(public)/video/detail/[slug]/page.tsx index bd72fcd1..787308e3 100644 --- a/app/[locale]/(public)/video/detail/[slug]/page.tsx +++ b/app/[locale]/(public)/video/detail/[slug]/page.tsx @@ -35,10 +35,32 @@ export async function generateMetadata({ params }: any): Promise { return { title: video.title, description: video.description, + // openGraph: { + // title: video?.title, + // description: video?.description, + // videos: [`${video?.smallThumbnailLink}`], + // }, openGraph: { title: video?.title, description: video?.description, - videos: [`${video?.smallThumbnailLink}`], + url: `https://mediahub.polri.go.id/in/video/detail/${slug}`, + type: "video.other", + images: [ + { + url: video?.thumbnailLink, + width: 1280, + height: 720, + alt: video?.title || "Thumbnail Mediahub Polri", + }, + ], + }, + twitter: { + card: "summary_large_image", + title: video?.title, + description: video?.description, + images: [ + video?.thumbnailLink, + ], }, }; }