Analytics badge
Successful responses return
200 and image/svg+xml; charset=utf-8. Invalid usernames return 400 with plain text Invalid username. The transparent style is a 1×1 SVG; it is not a visible counter.
The route schedules metric collection after handling the request. A cached badge can be returned without recording another origin event. Collection failure does not prevent the SVG response. Account entitlement and privacy policy further determine what is retained.
The route sets Cache-Control: public, max-age=0, s-maxage=3600, stale-while-revalidate=3600. Its Cloudflare cache entry uses a one-hour lifetime. Counts reflect observed badge fetches, commonly from GitHub’s image proxy; they are not unique human visitors. See metrics and privacy.
Publication-health badge
200 SVG with Operational, Degraded, or Incident and the stored score. Invalid usernames return 400 plain text.
If the health lookup throws, the handler retains its Operational 100% fallback. This fallback does not prove a successful refresh. Normal no-data health behavior is defined by the health store; read health semantics before using the badge as a monitoring signal.
Headers include Cache-Control: public, max-age=0, s-maxage=120, stale-while-revalidate=300. This endpoint does not count README visitors or initiate a health check.
Sources: analytics badge and health badge.