Skip to content

Add a link-preview card (og:image) rendered with Strata - #270

Merged
dmccoystephenson merged 1 commit into
mainfrom
feat/og-image
Nov 11, 2026
Merged

dmccoystephenson merged 1 commit into
mainfrom
feat/og-image

Conversation

@dmccoystephenson

Copy link
Copy Markdown
Member

Summary

A shared link to this game currently unfurls with no picture: the page has no og:image. This adds a 1200x630 link-preview card, rendered headless with Strata, and the <meta> tags that name it.

The new link-preview card

  • Picture: community-site-kit tools/og-card's coast scene (green headlands, a teal bay, a lighthouse, afternoon sun), with the title and the page's own tagline. Spec in og-card/card.json, provenance in og-card/card.provenance.json, steps in og-card/README.md.
  • Tags: web/index.html gains a description plus og:type/site_name/title/description/url/image(+type, width, height, alt) and twitter:card=summary_large_image with the same title, description, image and alt text.
  • Hosting (owner decision): arcade serves only index.html, game.zip and version.txt for a tak game, so the game's own host cannot serve the PNG. The tags therefore point at https://raw.githubusercontent.com/Stephenson-Software/FishE/main/web/og.png (public repo, served as image/png). The alternative, an arcade change that serves /og.png out of a tak game's bundle, was not made here.
  • Re-rendering: og-card/README.md (pinned og-card commit and Strata 0.6.0 release, SHA-checked by the tool).

Verification

  • Full suite run the way CI runs it (pip install pytest pytest-cov pygame -r requirements.txt, SDL_VIDEODRIVER=dummy python -m pytest, Python 3.12): 1110 passed. New tests/web/test_og_image.py (4 tests): the PNG is 1200x630 and under 512 KB; each tag appears once; image URL, size and alt text match og-card/card.json; preview title/description match the page.
  • The new test was mutation-checked: changing the page's alt text made it fail.
  • The card was looked at before committing; the alt text describes what is in it.

Notes

  • Merging this deploys the game to arcade (arcade.yml runs on every push to main), so the merge is left to the owner.

drafted by Claude on behalf of Daniel Stephenson

🤖 Generated with Claude Code

https://claude.ai/code/session_01LYNeuo7EcTsfm3BxWEeYgi

web/og.png is a 1200x630 card made by community-site-kit's og-card tool:
the coast scene (headlands, a teal bay, a lighthouse) rendered headless
with Strata 0.6.0, with the title and tagline over it. web/index.html
gains a description and the og:/twitter: tags naming it, with alt text.
arcade serves only index.html and game.zip for a tak game, so the image
is linked from GitHub's raw host. tests/web/test_og_image.py checks the
PNG's size and that the tags and alt text match og-card/card.json.

drafted by Claude on behalf of Daniel Stephenson

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LYNeuo7EcTsfm3BxWEeYgi
@dmccoystephenson
dmccoystephenson merged commit 8603f34 into main Nov 11, 2026
2 checks passed
@dmccoystephenson
dmccoystephenson deleted the feat/og-image branch November 11, 2026 04:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant