diff --git a/STANDARDS.md b/STANDARDS.md index 14429c1..2793ad5 100644 --- a/STANDARDS.md +++ b/STANDARDS.md @@ -410,6 +410,61 @@ than failing. badge on `branch=main` so a failing PR does not turn it red. Then install, quick start, configuration, development, contributing, license. +## Repository profile + +A visitor meets a public repo before its README: in search, Explore, Trending, +awesome lists and link unfurls they see only the About box and the social +preview. Every public repo fills in all of it. Private repos are not listed +anywhere, so they skip this section. + +- **Description.** One sentence on what the user gets, not how it is built, + ending in one emoji for the subject. Search and Explore cut it off at about + 100 characters, so the words someone would search for come first; a list of + supported models or a second sentence goes in the README instead. A fork + rewrites upstream's description rather than keeping it, since a fork is + usually published for a reason upstream's text does not mention. +- **Topics.** Five to ten, lowercase and hyphenated. Always the ecosystem topic + that its users browse by (`homebridge-plugin`, `homekit`, `github-actions`) + and the language. A word already in the repo name adds nothing, since search + matches the name anyway. +- **Homepage.** The package's registry page where one is published (npm, PyPI), + else the docs site, else empty. Never the repo's own URL. +- **Social preview and README banner.** One design in two sizes: a 1280x640 card + uploaded as the social preview, and a 1280x320 banner cut from it at the top + of the README, so the two read as one thing. The tagline on both says what the + description says, in different words. The card carries the name, the tagline, + the install command and one hero visual, and nothing else, and never shows the + owner's real data. + +The card's sources are committed, so anyone can change a word and render it +again: + +| Path | What it is | +| ----------------------------------------------- | --------------------------------- | +| `.github/social/src/social-preview.html` | The card | +| `.github/social/src/social-preview-banner.html` | The banner, derived from the card | +| `.github/social/src/card-base.css` | Shared canvas and type scale | +| `.github/social/src/` (other files) | Images the card uses | +| `.github/social/social-preview.png` | Rendered card, under 1MB | +| `.github/social/social-preview-banner.png` | Rendered banner | + +The README opens with the banner, above the title, as a Markdown image with an +absolute URL. Not an HTML ``: markdownlint rejects inline HTML (MD033), and +the image already fills the column, so there is nothing for HTML to add. + +```markdown +![__REPO__: the tagline](https://raw.githubusercontent.com/__OWNER__/__REPO__/main/.github/social/social-preview-banner.png) +``` + +A relative path would work on GitHub, but npm and PyPI render the same README +and resolve it against their own sites, where the image does not exist. The alt +text is the name and tagline, which is what the image says. + +GitHub has no API for the social preview, so it is uploaded by hand under +Settings, General, Social preview. Description, topics and homepage are set with +`gh repo edit`. Those three are not tracked as files: GitHub's About box already +holds them, and a copy in the repo would drift from it. + ## Markdown markdownlint-cli2 and mdformat, both run by `markdown.yml`. mdformat owns