Skip to content

Commit bf50bce

Browse files
committed
fix(opengraph): use metadata rather than head element
1 parent 55389bb commit bf50bce

File tree

1 file changed

+50
-24
lines changed

1 file changed

+50
-24
lines changed

src/app/layout.tsx

Lines changed: 50 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,57 @@ const robotoMono = Roboto_Mono({
1111
});
1212

1313
export const metadata: Metadata = {
14-
title: "PyConKE 2025",
14+
title: "Welcome to PyCon Kenya 2025",
1515
description: "Africa's largest Python conference, held in Nairobi, Kenya.",
16+
authors: [
17+
{
18+
name: "Rodney Osodo",
19+
url: "https://rodneyosodo.com",
20+
},
21+
],
22+
keywords: [
23+
"Python",
24+
"Conference",
25+
"Africa",
26+
"Nairobi",
27+
"Kenya",
28+
"Developer",
29+
"Community",
30+
],
31+
openGraph: {
32+
type: "website",
33+
title: "Welcome to PyCon Kenya 2025",
34+
description:
35+
"Africa's largest Python conference, held in Nairobi, Kenya. Join us for a weekend of inspiring talks, informative workshops, and fun networking events.",
36+
url: process.env.NEXT_PUBLIC_BASE_URL || "https://pycon.ke",
37+
siteName: "PyConKE 2025",
38+
images: [
39+
{
40+
url: `${process.env.NEXT_PUBLIC_BASE_URL || "https://pycon.ke"}/opengraph.png`,
41+
secureUrl: `${process.env.NEXT_PUBLIC_BASE_URL || "https://pycon.ke"}/opengraph.png`,
42+
alt: "PyConKE 2025",
43+
type: "image/png",
44+
width: 1200,
45+
height: 630,
46+
},
47+
],
48+
},
49+
twitter: {
50+
card: "summary_large_image",
51+
title: "Welcome to PyCon Kenya 2025",
52+
description:
53+
"Africa's largest Python conference, held in Nairobi, Kenya. Join us for a weekend of inspiring talks, informative workshops, and fun networking events.",
54+
images: [
55+
{
56+
url: `${process.env.NEXT_PUBLIC_BASE_URL || "https://pycon.ke"}/opengraph.png`,
57+
secureUrl: `${process.env.NEXT_PUBLIC_BASE_URL || "https://pycon.ke"}/opengraph.png`,
58+
alt: "PyConKE 2025",
59+
type: "image/png",
60+
width: 1200,
61+
height: 630,
62+
},
63+
],
64+
},
1665
};
1766

1867
export default function RootLayout({
@@ -23,29 +72,6 @@ export default function RootLayout({
2372
const baseUrl = process.env.NEXT_PUBLIC_BASE_URL;
2473
return (
2574
<html lang="en">
26-
<head>
27-
<meta property="og:type" content="website" />
28-
<meta property="og:title" content="Welcome to PyCon Kenya 2025" />
29-
<meta
30-
property="og:description"
31-
content="Africa's largest Python conference, held in Nairobi, Kenya. Join us for a weekend of inspiring talks, informative workshops, and fun networking events."
32-
/>
33-
<meta property="og:url" content={`${baseUrl}/opengraph.png`} />
34-
35-
<meta property="og:image" content={`${baseUrl}/opengraph.png`} />
36-
<meta property="og:image:width" content="1200" />
37-
<meta property="og:image:height" content="630" />
38-
39-
<meta name="twitter:card" content="summary_large_image" />
40-
<meta name="twitter:title" content="Welcome to PyCon Kenya 2025" />
41-
<meta
42-
name="twitter:description"
43-
content="Africa's largest Python conference, held in Nairobi, Kenya. Join us for a weekend of inspiring talks, informative workshops, and fun networking events."
44-
/>
45-
<meta name="twitter:image" content={`${baseUrl}/opengraph.png`} />
46-
<meta name="twitter:image:width" content="1200" />
47-
<meta name="twitter:image:height" content="630" />
48-
</head>
4975
<body className={`${robotoMono.className} antialiased`}>
5076
<div className="absolute inset-0 -z-10 h-full w-full bg-white bg-[linear-gradient(to_right,#8080800a_1px,transparent_1px),linear-gradient(to_bottom,#8080800a_1px,transparent_1px)] bg-[size:14px_24px]">
5177
<NavBar />

0 commit comments

Comments
 (0)