Skip to content

Commit a16895f

Browse files
fixed meta tags
1 parent 3615984 commit a16895f

File tree

1 file changed

+21
-5
lines changed

1 file changed

+21
-5
lines changed

src/app/paper/[id]/page.tsx

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,37 @@ export async function generateMetadata({
1616
const paper: PaperResponse | null = await fetchPaperID(params.id);
1717

1818
if (paper) {
19-
const subject = paper.subject;
2019
return {
21-
title: `Papers | ${subject}`,
20+
metadataBase: new URL("https://papers.codechefvit.com/"),
21+
title: `Papers| ${paper.subject}| ${paper.exam} |${paper.slot}`,
22+
description:
23+
`Discover ${paper.subject}'s question paper created by CodeChef-VIT at Vellore Institute of Technology. Made with ♡ to help students excel.`,
24+
icons: [{ rel: "icon", url: "/codechef_logo.svg" }],
2225
openGraph: {
23-
title: "Papers by CodeChef-VIT | Exam Resources",
26+
title: `Papers| ${paper.subject}| ${paper.exam} |${paper.slot}`,
2427
images: [{ url: "/papers.png" }],
2528
url: "https://papers.codechefvit.com/",
2629
type: "website",
2730
description:
28-
"Discover previous year question papers created by CodeChef-VIT at Vellore Institute of Technology. Made with ♡ to help students excel.",
31+
`Discover ${paper.subject}'s question paper created by CodeChef-VIT at Vellore Institute of Technology. Made with ♡ to help students excel.`,
2932
siteName: "Papers by CodeChef-VIT",
3033
},
3134
twitter: {
32-
title: `Papers | ${subject}`,
35+
card: "summary_large_image",
36+
title: `Papers| ${paper.subject}| ${paper.exam} |${paper.slot}`,
37+
description:
38+
`Discover ${paper.subject}'s question paper created by CodeChef-VIT at Vellore Institute of Technology. Made with ♡ to help students excel.`,
39+
images: [{ url: "/papers.png" }],
3340
},
41+
applicationName: "Papers by CodeChef-VIT",
42+
keywords: [
43+
paper.subject,
44+
paper.exam,
45+
paper.slot,
46+
paper.year
47+
],
48+
robots: "index, follow",
49+
3450
};
3551
}
3652

0 commit comments

Comments
 (0)