Skip to content

A 404 page that points a missing package to uvx wheelgap #117

Closed

Description

@patrickballard

A link to a package that isn't in the top 5,000, such as wheelgap.github.io/tracker/p/some-package/, or a mistyped URL, lands on GitHub's generic 404 page, with no way back into the site and no next step. The site has no 404.html, and GitHub Pages serves one from the root of the published site when it exists. These visitors are looking for exactly what wheelgap does: they want to know about one package's wheels.

What to do

  • Add site/404.html in the site's style: "Not found". For a /p/<name>/ URL, say the package isn't in the top 5,000 the tracker scans, and give the command to check it yourself: uvx wheelgap NAME -t all --explain. Link to the home page lookup and the repo checker.
  • Use absolute paths for its CSS and links (/tracker/style.css), since GitHub serves it at whatever path was asked for.
  • If you read the name from location.pathname, accept it only when isPackageName() in site/logic.js does, and insert it as text, never HTML. Otherwise show the command with NAME. Lookup: don't put arbitrary text from the URL into the "isn't in the top 5,000" command #57 fixed the same kind of thing in the lookup: don't put arbitrary URL text into a command people will copy.
  • Keep a CSP like the other pages; if you need a script, put it in a file, not inline.
  • Tests in tests/site/ (node:test): a valid name gives the command, an invalid or odd one (../, spaces, <script>) gives the placeholder.
  • node --check in the Check workflow already covers new scripts in site/.

Activity

  1. added
    enhancement
    help wanted
    on Nov 16, 2026
  2. AdityaSreevatsaK commented on Nov 16, 2026

    @AdityaSreevatsaK
    Contributor

    Hi @patrickballard, I've implemented the custom 404 page and raised PR #122.

    The changes include package-name validation, safe command generation, navigation links, CSP and regression tests.

    All checks passed on my fork. The upstream workflow is currently awaiting approval.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementhelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions