Draw a social card for every repository - #9
Merged
Merged
Conversation
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.
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.
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).
--checkverifies 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/.