Skip to content

Commit

Permalink
fix: newsletter render page metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
CaliCastle committed Jun 16, 2023
1 parent 61537e7 commit f90e693
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions app/(main)/newsletters/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,20 @@ export async function generateMetadata({ params }: { params: { id: string } }) {

return {
title: newsletter.subject,
description: newsletter.subject,
openGraph: {
images: imageUrl,
images: imageUrl ? [{ url: imageUrl }] : undefined,
title: newsletter.subject ?? '',
description: newsletter.subject ?? '',
type: 'article',
},
twitter: {
card: 'summary_large_image',
title: newsletter.subject ?? '',
images: imageUrl,
description: newsletter.subject ?? '',
images: imageUrl ? [{ url: imageUrl }] : undefined,
site: '@thecalicastle',
creator: '@thecalicastle',
},
} satisfies Metadata
}
Expand Down

0 comments on commit f90e693

Please sign in to comment.