fix: vendor README badges so they render on npm (1.0.4) - #10
Merged
Conversation
npm's README image proxy returns 403 for img.shields.io URLs, so all five badges rendered broken on npmjs.com while working on GitHub. Relative image paths are rewritten by npm to GitHub raw URLs and load fine (as the existing assets/screenshots do), so vendor the three static tech badges into assets/badges and reference them relatively. The npm version and download badges are dropped rather than vendored: they would freeze at publish time, and npmjs.com already shows both in its sidebar. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Problem
All five README badges rendered broken on npmjs.com while working fine on GitHub.
Cause: GitHub proxies README images through
camo.githubusercontent.com, but npm routes absolute image URLs through its own hex-path image proxy, which returns 403 forimg.shields.io. The shields.io URLs themselves are fine (verified 200 directly) — the failure is at npm's proxy.Relative image paths behave differently: npm rewrites them to
raw.githubusercontent.com, and those load correctly — as the existingassets/screenshots/*.pngin this README already demonstrate.Changes
assets/badges/and referenced them relatively. Self-contained SVGs with logos inlined, ~9 KB total.Verification
Badge rendering on npm can only be confirmed after publish, since relative paths resolve against the default branch. GitHub rendering is verifiable on this branch now.
🤖 Generated with Claude Code