Repository navigation
Add a link-preview card (og:image) rendered with Strata - #270
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.tools/og-card'scoastscene (green headlands, a teal bay, a lighthouse, afternoon sun), with the title and the page's own tagline. Spec inog-card/card.json, provenance inog-card/card.provenance.json, steps inog-card/README.md.web/index.htmlgains adescriptionplusog:type/site_name/title/description/url/image(+type, width, height, alt)andtwitter:card=summary_large_imagewith the same title, description, image and alt text.index.html,game.zipandversion.txtfor a tak game, so the game's own host cannot serve the PNG. The tags therefore point athttps://raw.githubusercontent.com/Stephenson-Software/FishE/main/web/og.png(public repo, served asimage/png). The alternative, an arcade change that serves/og.pngout of a tak game's bundle, was not made here.og-card/README.md(pinned og-card commit and Strata 0.6.0 release, SHA-checked by the tool).Verification
pip install pytest pytest-cov pygame -r requirements.txt,SDL_VIDEODRIVER=dummy python -m pytest, Python 3.12): 1110 passed. Newtests/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 matchog-card/card.json; preview title/description match the page.Notes
arcade.ymlruns on every push tomain), 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