documentation
documentation copied to clipboard
[BUG] CLI’s non-index pages do not redirect to “default” version
What / Why
Non-index pages for the npm CLI docs do not currently redirect to the “default” version when omitting the version number (e.g., https://docs.npmjs.com/cli/commands/npx). Because of this, no permalink is available for docs pages to the most relevant version of particular commands (amongst other versioned resources). If this previously worked, those links are currently broken (see below).
When
- Malfunctioning (?) for at least the past couple of months
Where
All versioned npm CLI documentation content on the website (npm/documentation repo) deeper than these indices:
- https://docs.npmjs.com/cli/v8/commands
- https://docs.npmjs.com/cli/v8/configuring-npm
- https://docs.npmjs.com/cli/v8/using-npm
How
Current Behavior
Currently, users are only redirected to the npm CLI’s “default” version of docs pages for the “index” pages (e.g., https://docs.npmjs.com/cli/commands redirects to https://docs.npmjs.com/cli/v8/commands/).
Steps to Reproduce
-
Attempt to visit the “default” version of any page deeper than an “index” page by omitting the version number entirely (e.g., https://docs.npmjs.com/cli/commands/npx)
-
Expect to be redirected to the npm CLI’s “default” version of the docs page (e.g., https://docs.npmjs.com/cli/v8/commands/npx)
-
See the 404 error page instead (https://docs.npmjs.com/cli/commands/npx)
Expected Behavior
Be redirected to the npm CLI’s “default” version for docs page deeper than “index” pages when omitting the version number from the URL. Otherwise, we’d currently have to update links to, e.g., particular commands, every new major version of the npm CLI to avoid our links going stale.
Who
- @darcyclarke
- @ruyadorno
- @MylesBorins
References
- @rauschma’s Tweet inquiring about this functionality
- @ethomson’s Tweet classifying it as a bug
title: Managing teams redirect_from:
- /orgs/managing-teams
@katelyn43
Thanks for the thorough report! This was fixed by #242. Let me know if I missed any others that should be redirecting.