CE: Add og:image + Twitter large-card social previews#313
Merged
Conversation
- New crates/modelrelay-cloud/assets/og-image.png (1200x630, generated via OpenAI gpt-image-1.5) baked into the binary via include_bytes! - New /og-image.png route in routes/mod.rs (served same-origin so the CSP img-src 'self' data: stays unchanged, cache-control 24h) and added to SESSION_EXEMPT_ROUTES so session_guard doesn't block it - page_shell_custom (modelrelay-web) gains og:image/width/height/alt + twitter:image/alt, and twitter:card upgraded to summary_large_image - Static templates index.html and pricing.html updated the same way - New og_image_returns_png + landing_page_includes_og_image_meta tests verify route + PNG magic bytes + meta tags; updated pricing test to assert summary_large_image
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.
What
Adds a real 1200x630 branded social-share image so links to modelrelay.io render as professional cards on Twitter, Slack, Discord, iMessage, LinkedIn, etc.
Why
Verified gap before doing the work: `curl https://modelrelay.io/ | grep -iE "og:image|twitter:image"` returned nothing. Every page_shell page and the two static templates (index.html, pricing.html) declared og:title/description/url but no image, and twitter:card was set to `summary` (small thumbnail). Sharing a modelrelay.io link today shows a bare URL with no preview, which looks unfinished next to peers like Stripe, Vercel, Linear.
Changes
Tests
Manual verification after deploy