From 6542db8c9201e027f0bbdcace249a1a3d4516d3e Mon Sep 17 00:00:00 2001 From: imnyang Date: Sun, 19 Apr 2026 20:30:25 +0900 Subject: [PATCH] feat: enhance post detail metadata with tweet title or text --- apps/frontend/src/app/detail/[id]/page.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/frontend/src/app/detail/[id]/page.tsx b/apps/frontend/src/app/detail/[id]/page.tsx index 85fcf68..547aad5 100644 --- a/apps/frontend/src/app/detail/[id]/page.tsx +++ b/apps/frontend/src/app/detail/[id]/page.tsx @@ -13,6 +13,10 @@ type PostDetailResponse = { url?: string; author?: string; tags?: string[]; + tweet: { + text?: string; + title?: string; + }; mediaUrl?: string; mediaIndex?: number; }; @@ -118,7 +122,7 @@ export async function generateMetadata({ params }: { params: Promise<{ id: strin const source = getSourceLabel(post.type); const author = post.author?.trim() || "unknown"; - const title = `${author} | ${source}`; + const title = `${author} - ${post.type == "twitter" ? post.tweet.text : post.tweet.title} | ${source}`; const description = createDetailDescription(post); const ogImages = post.mediaUrl ? [