Skip to content

Fix broken links related to the new "Trusted publishing" page #1690

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 4, 2025

Conversation

generalmimon
Copy link
Contributor

@generalmimon generalmimon commented Aug 1, 2025

The internal links added in #1674 followed the on-disk paths and did not respect that the URL paths use a different scheme, as explained in https://github.com/npm/documentation/blob/4c574b89e23515d8411e5ec52624d6a932b874e0/CONTRIBUTING.md#urls:

URLs

Note that for backward compatibility reasons, the on-disk paths are not precisely identical to the URLs for the documentation. To keep URLs expressive but still short, intermediate directories are removed from a page's URL.

(...)

You might (understandably) expect the page "Creating Node.js modules" to be URL-wise beneath contributing-packages-to-the-registry, but unfortunately, you would be wrong. To keep URLs short, the intermediate folder paths are removed from pages, so "Creating Node.js modules" becomes https://docs.npmjs.com/creating-node-js-modules.

Also see https://github.com/npm/documentation/blob/4c574b89e23515d8411e5ec52624d6a932b874e0/CONTENT-MODEL.md#content-structure:

Content structure

Docs are grouped by topic.

As a result, these links did not work at https://docs.npmjs.com/. This PR fixes them.

References

Related to #1674 (all links fixed in this PR were introduced there)

@generalmimon generalmimon requested review from leobalter and a team as code owners August 1, 2025 12:05
Copy link
Contributor

@leobalter leobalter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much for catching my broken links here!

@generalmimon
Copy link
Contributor Author

generalmimon commented Aug 4, 2025

In the last force push, I restored the significant trailing spaces in content/packages-and-modules/securing-your-code/requiring-2fa-for-package-publishing-and-settings-modification.mdx (link) - this should fix the failure of the CI job Lint.

@leobalter leobalter merged commit 611c816 into npm:main Aug 4, 2025
8 of 9 checks passed
@generalmimon generalmimon deleted the fix-broken-links branch August 4, 2025 16:08
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.

2 participants