Skip to content

Commit

Permalink
pass through forceWrapAuthors bool
Browse files Browse the repository at this point in the history
  • Loading branch information
Shane98c committed Jan 9, 2025
1 parent a2dddd2 commit 0bd3eb7
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion pages/api/og.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,17 @@ export default async function handler(req) {
const authors = post.authors.map((author) =>
typeof author === 'string' ? author : author?.name || ''
)
const forceWrapAuthors = searchParams.get('forceWrapAuthors') === 'true'

return new ImageResponse(
<BlogPostOG title={title} date={date} authors={authors} />,
(
<BlogPostOG
title={title}
date={date}
authors={authors}
forceWrapAuthors={forceWrapAuthors}
/>
),
{
width: 1200,
height: 630,
Expand Down

0 comments on commit 0bd3eb7

Please sign in to comment.