feat: enhance post detail metadata with tweet title or text

This commit is contained in:
암냥 2026-04-19 20:30:25 +09:00
commit 6542db8c92
No known key found for this signature in database

View file

@ -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
? [