chore: put the project icon on the social cards - #38
Merged
Conversation
The cards carried the product screenshot but nothing identifying the project, so a link preview looked like a generic screenshot of a landscape photo rather than something with a name attached. Adds the icon on a light tile — it is amber and black on transparency, so it needs one to read against the dark card at all — and moves the accent colour from blue to the icon's own amber so the card and the icon look like the same project. Two sizes, because the two places want different ratios: 1280x640 for the GitHub repository preview, 1200x630 for Open Graph. GitHub's preview is upload-only, so its card lives in the repo as the source to re-upload from rather than being wired to anything. Co-Authored-By: Claude Opus 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.
Follow-up to #34. The cards showed the product but nothing identifying the project, so a link preview read as a generic screenshot of a landscape photo rather than as something with a name.
What changed
#FECE23, sampled from the icon), so the card and the icon look like the same project..github/assets/social-preview.png— 1280×640, GitHub's stated best-display size.demo/social-preview.jpg— 1200×630, the Open Graph size the demo page's tags already point at. Replaces the previous unbranded card.Both render from one template, so they stay consistent.
Still a manual step
GitHub does not expose the repository social preview through its API.
.github/assets/social-preview.pngis committed as the file to upload under Settings → General → Social preview, and as the source to re-upload from if it ever changes.Note
demo/social-preview.jpgonly reaches the live site on the nextnpm run publish:demo.Verification
format:checkgreen. Dimensions confirmed with ffprobe: 1280×640 and 1200×630.🤖 Generated with Claude Code