Skip to content

chore: put the project icon on the social cards - #38

Merged
killerwolf merged 1 commit into
mainfrom
chore/branded-social-cards
Sep 6, 2026
Merged

chore: put the project icon on the social cards#38
killerwolf merged 1 commit into
mainfrom
chore/branded-social-cards

Conversation

@killerwolf

Copy link
Copy Markdown
Owner

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

  • The icon is on the card, sitting on a light tile. It has to be: the icon is amber and black on full transparency, so against the dark card the black frame and mountain would simply disappear.
  • Accent colour moved from blue to the icon's own amber (#FECE23, sampled from the icon), so the card and the icon look like the same project.
  • Two sizes, because the two destinations want different ratios:
    • .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.png is 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.jpg only reaches the live site on the next npm run publish:demo.

Verification

format:check green. Dimensions confirmed with ffprobe: 1280×640 and 1200×630.

🤖 Generated with Claude Code

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>
@killerwolf
killerwolf merged commit 2a50e62 into main Sep 6, 2026
2 checks passed
@killerwolf
killerwolf deleted the chore/branded-social-cards branch September 6, 2026 08:13
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