Skip to content

One README for GitHub and nuget.org; bump to 1.3.1 - #23

Merged
danielmeza merged 2 commits into
mainfrom
build/nuget-readme
Sep 22, 2026
Merged

danielmeza merged 2 commits into
mainfrom
build/nuget-readme

Conversation

@danielmeza

Copy link
Copy Markdown
Owner

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's MarkdownService), 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.targets hooks $(BeforePack) and generates the package's copy of the repo README:

  • HTML to Markdown: <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.
  • Pinned URLs: relative images point to raw.githubusercontent.com and relative links to github.com/.../blob/. Both are pinned to the commit being packed, so each package version shows the README and screenshots of its own source.
  • Safety check: the build warns if any HTML survives.

Also:

  • The macOS note is a [!NOTE] alert again, because NuGetGallery enables UseAlertBlocks.
  • The logo is 128 px, because nuget.org shows images at natural size.
  • Version is 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.
  • I rendered the packed README with NuGetGallery's exact Markdig pipeline (same extensions, DisableHtml). The logo, header, badges, GIF, tables and troubleshooting sections all render, with no escaped HTML.

After merge

Tag v1.3.1 on 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

danielmeza and others added 2 commits September 22, 2026 00:05
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>
@danielmeza
danielmeza merged commit 60993be into main Sep 22, 2026
1 check passed
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