Repository navigation
Rich link previews: Open Graph tags and a preview image - #56
Merged
Merged
Conversation
Adds og:/twitter: meta tags, a theme colour for the Discord embed bar and a 1200x630 preview image in the app's style, with its HTML source. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Deploying lsos with
|
| Latest commit: |
9bc5a87
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://b015d4ba.lsos-2qs.pages.dev |
| Branch Preview URL: | https://claude-39-link-embeds.lsos-2qs.pages.dev |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 this does
Links to LSOS now unfurl as large preview cards on Discord, Slack, X and similar.
index.htmlgets Open Graph and Twitter card tags: a title ("LSOS: GTA Online business tracker"), a longer description, the site name, the canonical URL, and a large 1200×630 image (public/og-image.png). It also gets atheme-color, which sets the colour of Discord's embed side bar to the app's green. The image follows the app theme (colours fromsrc/app.css, Oswald font, terminal icon, decorative stock, supply, safe and cooldown bars with no numbers on them). Its HTML source isscripts/og-image.html, and the steps to regenerate it are in a comment at the top of that file. The browser tab title stays "LSOS".The image URL is absolute and points at
https://lsos.toothy.dev/, so preview deploys show the image only once this is live on the production site.Closes #39
How to check it
https://lsos.toothy.dev/into Discord. Discord caches embeds, so add a query string such as?v=2to get a fresh preview.public/og-image.pngdirectly.Checklist
npm run verifypasses🤖 Generated with Claude Code