Repository navigation
Add a share-preview image (og:image) served at /og.png on the API host - #9
Merged
Merged
Conversation
src/arcade/og.png is a 1200x630 card (the page's name, DESCRIPTION and the play domain, in its dark colours). The landing page now carries og:image and twitter:image at https://<domain>/og.png with type, width, height and alt, and a summary_large_image Twitter card. GET /og.png is answered on the API host only, like /robots.txt, so a game's own /og.png is never shadowed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BZQMN1M5hQKfUpPwDkMjqd
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
The landing page at play.danielstephenson.dev got share-preview text tags in #8, but no image, because the repository held none. This adds one.
src/arcade/og.png: a 1200×630 card showing the page's name ("Play"), the existingDESCRIPTIONand the domain. It uses the landing page's dark-scheme tokens (#121418background,#7d98ffaccent). It is about 15 KB. No artwork is invented.landing.py:OG_IMAGE_PATH,OG_IMAGE_WIDTH/HEIGHT,OG_IMAGE_ALT, andogImage(), which reads the bytes once. The page now carriesog:imageandtwitter:imageathttps://<domain>/og.png, plusog:image:type/width/height/altandtwitter:image:alt.twitter:cardis nowsummary_large_image.server.py:GET/HEAD /og.pngserves the PNG asimage/png(Cache-Control: public, max-age=86400) on the API host only, next to/robots.txt. A game's host never answers it, so a static game's own/og.pngis not shadowed.img-src data:) is unchanged.Dockerfilealready copiessrc/, so the PNG ships in the image.og:image. New tests check the PNG's IHDR size against the constants (and that it is under 150 KB), that the API host serves the bytes forGETandHEAD, and that on game hosts/og.pngis the game's own file or a 404.[Unreleased]and the README endpoint table updated.The card's text names
play.danielstephenson.dev, the production domain. The tag URLs follow the configured domain.Test plan
python -m pytest: 145 passedPYTHONPATH=src python -m arcade check-registry examples/games.yamldrafted by Claude on behalf of Daniel Stephenson
🤖 Generated with Claude Code
https://claude.ai/code/session_01BZQMN1M5hQKfUpPwDkMjqd