Skip to content

Commit ae40fcd

Browse files
committed
show og images on the home page only
1 parent 6c041a8 commit ae40fcd

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

app/[[...path]]/page.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,10 +200,14 @@ export async function generateMetadata(props: MetadataProps): Promise<Metadata>
200200
: domain;
201201
let title =
202202
'Sentry Docs | Application Performance Monitoring &amp; Error Tracking Software';
203-
let customCanonicalTag;
203+
let customCanonicalTag: string;
204204
let description =
205205
'Self-hosted and cloud-based application performance monitoring &amp; error tracking that helps software teams see clearer, solve quicker, &amp; learn continuously.';
206-
const images = [{url: `${previewDomain ?? domain}/og.png`, width: 1200, height: 630}];
206+
// show og image on the home page only
207+
const images =
208+
((await props.params).path ?? []).length === 0
209+
? [{url: `${previewDomain ?? domain}/og.png`, width: 1200, height: 630}]
210+
: [];
207211

208212
const rootNode = await getDocsRootNode();
209213

0 commit comments

Comments
 (0)