Repository navigation
One README for GitHub and nuget.org; bump to 1.3.1 - #23
Merged
Merged
Conversation
nuget.org renders package READMEs with raw HTML disabled (Markdig DisableHtml in NuGetGallery's MarkdownService), ignores relative links, and loads images only from allow-listed hosts. Instead of keeping a second README, build/PackageReadme.targets runs before pack (via $(BeforePack)) and generates the package's copy of the repo README: - The HTML the README uses becomes Markdown: <img> to images, <a> to links, the centered <h1>/<h4> header to a heading and a bold tagline, <p> unwrapped, and <details>/<summary> to ### sections. - Relative images point to raw.githubusercontent.com and relative links to github.com/.../blob/, both pinned to the commit being packed, so each package version shows the README and screenshots of the source it was built from. - It warns if any HTML survives. Checked by packing all six libraries (every README has zero HTML tags) and rendering the result with NuGetGallery's Markdig pipeline configuration. Also: the macOS note goes back to a [!NOTE] alert, since NuGetGallery enables UseAlertBlocks; the logo is 128 px so it isn't oversized on nuget.org, where it renders at natural size. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <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.
Follow-up to #22, which merged before these two commits landed. nuget.org can only show a new README with a new package version, so this makes the packed README render there and bumps the version to 1.3.1.
Why
nuget.org renders package READMEs with raw HTML disabled (
DisableHtml()in NuGetGallery'sMarkdownService), ignores relative links, and only loads images from allow-listed hosts. The new README's centered header,<details>sections and relative screenshots would show up broken. The currently published 1.3.0 page already has broken relative images.What
One README for both sites, with no second copy to maintain.
build/PackageReadme.targetshooks$(BeforePack)and generates the package's copy of the repo README:<img>becomes an image and<a>a link, the centered<h1>/<h4>header becomes a heading plus a bold tagline,<p>is unwrapped, and<details>/<summary>become###sections.raw.githubusercontent.comand relative links togithub.life-white.uk/.../blob/. Both are pinned to the commit being packed, so each package version shows the README and screenshots of its own source.Also:
[!NOTE]alert again, because NuGetGallery enablesUseAlertBlocks.Versionis bumped to 1.3.1.Checked
dotnet build CrossEscPos.slnx -c Release: 0 warnings, 0 errors.dotnet pack CrossEscPos.slnx -c Release --no-build(as CI runs it) produced all 6 packages, and every packed README has zero HTML tags.DisableHtml). The logo, header, badges, GIF, tables and troubleshooting sections all render, with no escaped HTML.After merge
Tag
v1.3.1on the merge commit. The Release workflow then publishes the 6 packages to nuget.org and creates the v1.3.1 GitHub release with the desktop builds.🤖 Generated with Claude Code