Render the README header on nuget.org - #52
Merged
Conversation
nuget.org renders CommonMark only: the <picture> markup 1.2.2 shipped is escaped into the visible h1, and its relative srcset paths could never resolve there anyway - README images render solely from allowlisted absolute URLs. The mark is now one file, assets/logo-readme.svg: the icon artwork with an intrinsic 40px size, referenced with plain markdown from raw.githubusercontent.com (an allowlisted domain). Declaring the size in the SVG root removes the need for a width attribute, and the white tile carrying its own background removes the need for a light/dark <picture> switch - the tile disappears into light pages leaving the bare glyph, and reads as the package icon on dark ones. Sitting on the baseline it behaves like a capital letter, so no align hack either. The two offset-compensated variant cuts retire with the markup that needed them. The license badge now links absolutely for the same reason relative images fail: nuget.org resolves relative hrefs against its own pages. The live package pages pick this up with the next published version. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WUBuxPxvyctDSNQNqNo6e5
Uh oh!
There was an error while loading. Please reload this page.
ipjohnson added a commit
that referenced
this pull request
Aug 29, 2026
Version and changelog, plus one word: the README mark now carries alt text, because nuget.org substitutes a visible-to-screen-readers nag string into images whose alt is empty. The header fix itself landed in #52 and was verified on the 1.2.3-preview.1 package page; this is the release that puts it on the stable page, since a README is per published version. Claude-Session: https://claude.ai/code/session_01WUBuxPxvyctDSNQNqNo6e5 Co-authored-by: Claude Fable 5 <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 freeto 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.
What broke
The nuget.org package page shows the 1.2.2 README title as a wall of escaped HTML: nuget.org renders CommonMark only, so the
<picture><source…><img width="64" align="middle">header lands in the h1 as literal text. Its relativeassets/…paths were a second, latent bug — nuget.org only renders README images from allowlisted absolute URLs, never from relative paths or the package itself.The fix
One self-sized mark, plain markdown:
assets/logo-readme.svgis the icon artwork with an intrinsicwidth="40" height="40"— declaring the size in the SVG root is what removes the need for an HTML width attribute.<picture>switch and both offset-compensated variant cuts.raw.githubusercontent.com/…/main/…URL, a domain nuget.org allowlists (the coverage badge already relies on it).Note: the README image in this PR's branch view will show broken until merge — the URL points at
main, which doesn't have the asset yet. That's expected.Release plan
READMEs are immutable per published version, so the live page updates on the next publish. Sequence after merge: tag
v1.2.3-preview.1to see the rendering on a real package page, then cutv1.2.3(version bump + changelog date, per convention).🤖 Generated with Claude Code
https://claude.ai/code/session_01WUBuxPxvyctDSNQNqNo6e5