Skip to content

Draw a social card for every repository - #9

Merged
DenisDrobyshev merged 1 commit into
masterfrom
add/social-cards
Sep 18, 2026
Merged

DenisDrobyshev merged 1 commit into
masterfrom
add/social-cards

Conversation

@DenisDrobyshev

Copy link
Copy Markdown
Member

Every repository shows GitHub's default grey preview when linked. The site has had a generated card since August; the repositories had none.

One generator, the site's visual language, seven cards at 1280×640 (what GitHub crops to).

--check verifies presence and size rather than bytes: the cards are drawn with whatever fonts the machine has, and a Linux runner has neither Georgia nor Calibri.

Uploading is manual — GitHub has no API for the social preview. After merge, for each repository: Settings → General → Social preview → Upload, using the matching file from cards/.

Every repository in the organisation showed GitHub's default preview when its
link was pasted anywhere: a grey card with an avatar and a line of metadata.
The site has had a generated card since August. The repositories, which are what
people actually link to, had none.

One generator draws all seven in the site's visual language, so they cannot
drift into seven different looks. What a card says comes from REPOS in the
script rather than from the GitHub API: it is a decision about what to lead
with, and a generator that silently redraws when someone edits a description is
one nobody can review.

Uploading a card is still manual — GitHub exposes no API for the social preview
— so the cards are committed here and the repository settings point at them.
@DenisDrobyshev
DenisDrobyshev merged commit 07d95e9 into master Sep 18, 2026
1 check passed
@DenisDrobyshev
DenisDrobyshev deleted the add/social-cards branch September 18, 2026 19:27
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