{/* Background image + dimming overlay */}
{hasImage ? (
<>

{/* Bottom-up gradient anchors the caption against the image */}
>
) : null}
{/* Caption — the centrepiece */}
160 ? 36 : 44,
fontWeight: 700,
color: textPrimary,
lineHeight: 1.35,
marginTop: 20,
maxHeight: 380,
overflow: "hidden",
zIndex: 1,
}}
>
“{displayCaption}”
{/* Reference (source citation) */}
{reference}
{/* Spacer pushes the byline + branding to the bottom */}
{/* Bottom row: author + branding */}
{post.author_avatar_url ? (

) : (
{initialsFor(authorName)}
)}
{authorName}
{authorHandle ? (
{authorHandle}
) : null}
prabhupadasays.org
),
{
width: 1200,
height: 630,
fonts: [
{
name: "Noto Sans",
data: fonts.regular,
style: "normal" as const,
weight: 400,
},
{
name: "Noto Sans",
data: fonts.bold,
style: "normal" as const,
weight: 700,
},
],
},
);
} catch (e) {
console.error("Post OG image generation failed:", e);
return new Response("Failed to generate OG image", { status: 500 });
}
}