Skip to content

Commit b92756b

Browse files
committed
Set og image
1 parent f9f67be commit b92756b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

app/(home)/[[...slug]]/page.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,17 @@ export async function generateMetadata(props: { params: Promise<{ slug?: string[
5656

5757
if (!page) notFound();
5858

59-
const metadataBase = new URL(getSiteUrl());
59+
const slug = Array.isArray(params.slug) ? params.slug.join('/') : params.slug;
60+
61+
// const metadataBase = new URL(getSiteUrl());
6062

6163
return createMetadata({
6264
title: page.data.title,
6365
description: page.data.description ?? 'Usegrant documentation',
6466
keywords: page.data.keywords,
67+
// metadataBase,
68+
openGraph: {
69+
images: [`/docs-og/${slug}/image.png`],
70+
},
6571
});
6672
}

0 commit comments

Comments
 (0)