Commit 425fa24
authored
feat: host the README badge at commit-check.com/badge.svg (#46)
This serves the Commit Check badge from the site, so the snippet a user
copies becomes one line:
```markdown
[](https://commit-check.com)
```
Today the snippet is a 519-character shields.io URL with the mark
base64-encoded into it, and every page view makes a request to a third
party. conventionalbranch.org/badge.svg already works this way.
## What's in it
- **`docs/badge.svg`.** This is a hand-written copy of the shields.io
render of the brand badge from
[`branding/README.md`](https://github.com/commit-check/.github/blob/main/branding/README.md).
It has the same 157×20 size, the same colors and flat style, and the
same `textLength`, which keeps the text identical on machines without
Verdana. The mark is drawn as vectors instead of an embedded image. A
comment in the file explains all of this, including the contrast
trade-off: white on Signal Blue is about 3:1, which is the color the
badge has always had. MkDocs copies the file to the site root.
- **Getting started.** A short *Show that you use it* section now shows
the badge, with Markdown and reStructuredText snippets in tabs. Until
now only the READMEs documented the badge.
## Checks
- I rendered both files with `rsvg-convert` at 6× and compared them with
ImageMagick. At 8% fuzz, 0 pixels differ, and the RMSE is 1.5e-5.
- `mkdocs build --strict` passes (with `SOCIAL_CARDS=false`).
`site/badge.svg` is in the output, and the page links it as
`../badge.svg`.
- `python -m pytest tests/ -q` passes with the released commit-check
installed (10 tests). The pins and the changelog were already at 2.18.1,
so nothing needed bringing into step.
## After this deploys
Once `https://commit-check.com/badge.svg` is live, the long snippet
elsewhere can switch to the short one:
- the *Show that you use it* sections of the commit-check and
commit-check-action READMEs (commit-check/commit-check#587,
commit-check/commit-check-action#293);
- the *README badge* section of `branding/README.md` in `.github`.
The badge rows in those READMEs can stay on shields.io. Only the snippet
users copy needs to change.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Documentation**
* Added a “Show that you use it” section with a commit-check badge and
copyable Markdown and reStructuredText snippets.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->1 parent 6886d4a commit 425fa24
2 files changed
Lines changed: 72 additions & 0 deletions
Loading
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
183 | 204 | | |
184 | 205 | | |
185 | 206 | | |
| |||
0 commit comments