Skip to content

feat: add a social card and link preview metadata - #11

Merged
vamgan merged 1 commit into
mainfrom
feat/social-card
Aug 25, 2026
Merged

vamgan merged 1 commit into
mainfrom
feat/social-card

Conversation

@vamgan

@vamgan vamgan commented Aug 25, 2026

Copy link
Copy Markdown
Owner

The banner and a social card are different images with different requirements, and the existing banner is wrong for the job.

Size Ratio
README banner 1600x400 4:1
Open Graph wants 1200x630 ~2:1
GitHub social preview wants 1280x640 2:1

At 4:1 the banner gets letterboxed or badly cropped in every preview client, and a centre crop cuts the wordmark.

What is here

site/assets/social.html, a separate composition rendered at 1280x640, which satisfies both Open Graph and GitHub. Bigger type, simpler layout, and the install command on the card, because a link preview is often the only thing anyone reads. The illustration sits right of centre so a centre crop never takes the wordmark with it.

Link preview metadata in index.html: Open Graph and Twitter card tags with an absolute image URL, since scrapers ignore relative paths; explicit dimensions so clients reserve space instead of reflowing; a canonical link; and theme-color for both schemes.

Verified the URL resolves against what Pages actually serves: the workflow publishes site/ as the root, so site/assets/social-card.png becomes /assets/social-card.png.

One thing I could not do

GitHub's repository social preview is UI-only. I checked rather than assumed: the repo object exposes no such field, and a PATCH with one is silently ignored. It has to be uploaded by hand at

Settings → General → Social preview → Edit → Upload an image

using site/assets/social-card.png from this branch.

Also

Repo description and homepage updated. The description still said "Claude Code skills ... browsers, downloads, notes", which is wrong twice over now: it works with any agent, and photos exist.

The README banner is 1600x400. Link previews are 2:1 and crop toward the
centre, so reusing it would have letterboxed or cut the wordmark in every
client that matters.

social.html is a separate composition at 1280x640, which is both the Open
Graph size and the size GitHub wants for a repository social preview.
Larger type, simpler layout, and the install command included, because
the card is often the only thing anyone reads. The concept illustration
sits right of centre so a centre crop never takes the wordmark with it.

index.html now carries Open Graph and Twitter card metadata with an
absolute image URL, since scrapers ignore relative paths, plus the
dimensions so clients reserve space instead of reflowing, a canonical
link, and theme-color for both schemes.
@vamgan
vamgan merged commit 546ea01 into main Aug 25, 2026
7 checks passed
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