Generating OpenGraph images
I recently started syndicating this blog’s contents to Bluesky. While at it, I made a few improvements to its OpenGraph metadata to make the display of cards in timelines a bit prettier.
The most noticeable improvement comes from og:image, which adds an image on
top of the page title:
The OpenGraph image for this post.
Ideally, I’d dynamically generate all images when running jekyll build.
However, the image generation plugin converts an SVG to webp through
imagemagick, which isn’t available in the Cloudflare builder. As a (ugly)
workaround, I pre-generate each image and
commit it to the repository.
In addition, each post now also includes OpenGraph tags for:
- Its modified time.
- Its section (e.g., micros).
- Its tags (if any).