Skip to content

📝 docs(migration): order guides by downloads, add npm/crates shields#597

Merged
gaborbernat merged 1 commit into
tox-dev:mainfrom
gaborbernat:docs/order-migration-downloads
Jul 8, 2026
Merged

📝 docs(migration): order guides by downloads, add npm/crates shields#597
gaborbernat merged 1 commit into
tox-dev:mainfrom
gaborbernat:docs/order-migration-downloads

Conversation

@gaborbernat

Copy link
Copy Markdown
Member

The migration-guide index ordered its toctree by per-namespace adoption, so a reader scanning the sidebar saw parse-and-DOM libraries first regardless of how widely each library is used. This orders the whole toctree by last-month download count, descending, across PyPI, npm, and crates, so the guides a reader is most likely to want sit at the top. 📊 The stdlib parser has no download metric, so it sorts last.

The package-meta directive rendered PyPI shields only, which left the five non-Python guides with no metadata row at all. The directive now takes an optional leading ecosystem argument: npm and crates render the shields.io badges for those registries, and a bare package name still means PyPI, so every existing .. package-meta:: <pypi-name> call is unchanged. npm carries version, license, and monthly downloads (there is no supported-Pythons badge); crates carries version, license, and downloads. The optional GitHub slug still adds the stars and last-commit badges for any ecosystem.

With that in place, the parse5, jsdom, DOMPurify, sanitize-html, and lol-html guides now open with their npm or crates shields, matching the PyPI guides. This also gives the lol-html guide the metadata row it never had.

Reorder the migration-guide toctree by last-month download count,
descending, across PyPI, npm, and crates rather than per-namespace
adoption. The stdlib parser has no download metric and sorts last.

Extend the package-meta directive to render npm and crates badges: the
first argument may name the ecosystem, defaulting to PyPI so existing
calls are unchanged. npm drops the supported-Pythons badge; crates
carries version, license, and downloads. Add the directive to the five
non-Python guides (parse5, jsdom, DOMPurify, sanitize-html, lol-html),
which had none, fixing the previously badge-less lol-html page.
@gaborbernat gaborbernat added the documentation Improvements or additions to documentation label Jul 8, 2026
@codspeed-hq

codspeed-hq Bot commented Jul 8, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 83 untouched benchmarks
⏩ 18 skipped benchmarks1


Comparing gaborbernat:docs/order-migration-downloads (8ee71a6) with main (a389e96)

Open in CodSpeed

Footnotes

  1. 18 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@gaborbernat gaborbernat merged commit e3afe02 into tox-dev:main Jul 8, 2026
49 checks passed
@gaborbernat gaborbernat deleted the docs/order-migration-downloads branch July 10, 2026 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant