Skip to content

docs: serve README badges without shields.io so they render through GitHub's image proxy - #24

Merged
ryanduguid merged 1 commit into
mainfrom
ryan/badges-self-hosted
Oct 30, 2026
Merged

ryanduguid merged 1 commit into
mainfrom
ryan/badges-self-hosted

Conversation

@ryanduguid

Copy link
Copy Markdown
Collaborator

Summary

The README badges now load from sources GitHub's image proxy can reach, so they no longer show as broken images.

GitHub serves external README images through its camo proxy, which returned 504 after about 4.2 s on most shields.io fetches on 30 October 2026. Each badge keeps its link target and alt text:

  • GitHub Actions status: the provider's own badge. GitHub's native workflow badges are not proxied and have GitHub's grey label.
  • Static badges (licence.svg, fork-of.svg, rust.svg): the exact shields.io SVGs, committed under .github/assets/badges/ and linked by relative path.
  • ATTRIBUTION.toml and ATTRIBUTION.md list the 3 committed badge SVGs, as the asset policy requires. Each records the original shields.io URL and Apache-2.0, the licence of badges/shields.

Evidence

  • Before: shields.io badge URLs fetched through camo mostly returned 504.
    After: each replacement URL returned 200 SVG on 5 of 5 fetches through camo; on this branch at a 375 px viewport all 17 non-banner images decoded.
  • Checks: cargo xtask assets first failed because each new SVG needs an ATTRIBUTION.toml entry; entries were added (source: the original shields.io URL, licence Apache-2.0 as badges/shields, SHA-256) and ATTRIBUTION.md regenerated with cargo xtask assets --write; then cargo xtask assets: ok, cargo test -p xtask: 42 passed.

Merge danger

Door: two-way. Blast radius: README

Unverified

  • The GitHub mobile app itself; the 375 px browser check stands in for it.

…s image proxy

GitHub's camo proxy timed out (504 after about 4.2 s) on most shields.io fetches, so the badges showed as broken images. Workflow badges now use GitHub's native badges, and static badges are committed SVGs.
@sonarqubecloud

Copy link
Copy Markdown

@ryanduguid
ryanduguid enabled auto-merge (squash) October 30, 2026 05:20
@ryanduguid
ryanduguid merged commit 42e8324 into main Oct 30, 2026
10 checks passed
@ryanduguid
ryanduguid deleted the ryan/badges-self-hosted branch October 30, 2026 05:35
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