Skip to content

Add share-preview tags to the landing page and robots.txt on the API host - #8

Merged
dmccoystephenson merged 1 commit into
mainfrom
feat/share-meta-robots
Oct 6, 2026
Merged

dmccoystephenson merged 1 commit into
mainfrom
feat/share-meta-robots

Conversation

@dmccoystephenson

Copy link
Copy Markdown
Member

Summary

A live audit of play.danielstephenson.dev (2026-10-04) found a canonical link but no share-preview tags and no robots.txt.

  • Landing page (src/arcade/landing.py): adds og:type, og:site_name, og:title, og:description, og:url (https://<ARCADE_DOMAIN>/, whose production default is already play.danielstephenson.dev), plus twitter:card=summary with its title and description. The title and description now live in TITLE/DESCRIPTION constants so <title>, the description and the preview tags cannot drift apart. No og:image is set because the repository has no image to reuse, and none was invented.
  • GET /robots.txt (src/arcade/server.py): User-agent: * / Allow: / as text/plain, answered on the API host only, next to /version.json. A game's host never answers it, so a static game's own robots.txt is not shadowed, and tak games, aliases and unknown hosts still 404. No sitemap was added (optional per the brief). The landing page is the only indexable document on that host.
  • CHANGELOG [Unreleased] entry added.

Tests

  • tests/test_landing.py: every share-preview tag is present on the configured domain, there is no localhost, and there is no og:image/twitter:image. A second test checks that og:url follows the configured domain.
  • tests/test_server.py: /robots.txt on the API host (GET + HEAD, content type, body). A static game's own robots.txt is served untouched on its host, while tak, alias, unknown and localhost hosts 404.

Verification

  • python -m pytest: 142 passed locally (Python 3.8).
  • python -m arcade check-registry examples/games.yaml: OK.
  • The landing page was rendered for play.danielstephenson.dev, and the output was confirmed to contain each tag with the production URL.

drafted by Claude on behalf of Daniel Stephenson

🤖 Generated with Claude Code

https://claude.ai/code/session_01BZQMN1M5hQKfUpPwDkMjqd

…host

og:* and twitter:* tags let a shared play.<base> link unfurl. robots.txt
allows all and is answered on the API host only, so it never shadows a
static game's own file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BZQMN1M5hQKfUpPwDkMjqd
@dmccoystephenson
dmccoystephenson merged commit e5c0d9b into main Oct 6, 2026
3 checks passed
@dmccoystephenson
dmccoystephenson deleted the feat/share-meta-robots branch October 6, 2026 03:00
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