Shared a blog link to a WhatsApp group just for fun. The preview was empty. Just the title and URL, no image.
That’s called an OG image. The image that shows up when a link is shared on social media or chat. Without it, the platform just shows plain text.
Making them by hand clearly doesn’t make sense. Blog, TIL, talks, projects, all of them need their own image. Luckily there’s astro-og-canvas. Every collection is pulled with getCollection, then mapped into a title and description for each page. That data gets passed to OGImageRoute, which generates the image route automatically. Gradient, border, font, all configured once.
Write a new TIL, and the OG image just shows up without me touching anything. Small things like this sometimes feel more satisfying than the writing itself.