Skip to content

Commit 257eed7

Browse files
committed
Preveiw fix
1 parent dcde7c6 commit 257eed7

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

src/app/posts/[slug]/page.tsx

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,32 @@ export async function generateMetadata(props: Params): Promise<Metadata> {
5252
return notFound();
5353
}
5454

55-
const title = `${post.title} | Next.js Blog Example with ${CMS_NAME}`;
55+
const title = `${post.title} | Official Blog of SLIIT SESC`;
56+
const description = post.excerpt;
5657

5758
return {
5859
title,
60+
description,
5961
openGraph: {
6062
title,
61-
images: [post.ogImage.url],
63+
description,
64+
images: [
65+
{
66+
url: post.coverImage,
67+
width: 1200,
68+
height: 630,
69+
alt: post.title,
70+
},
71+
],
72+
type: "article",
73+
authors: [post.author.name],
74+
publishedTime: post.date,
75+
},
76+
twitter: {
77+
card: "summary_large_image",
78+
title,
79+
description,
80+
images: [post.coverImage],
6281
},
6382
};
6483
}

0 commit comments

Comments
 (0)