Skip to content

fix(docs): replace absolute URLs with relative links across pages#43

Merged
avivkeller merged 2 commits intonodejs:mainfrom
srmaharana1999:fix/replace-absolute-urls-with-relative-links
Apr 5, 2026
Merged

fix(docs): replace absolute URLs with relative links across pages#43
avivkeller merged 2 commits intonodejs:mainfrom
srmaharana1999:fix/replace-absolute-urls-with-relative-links

Conversation

@srmaharana1999
Copy link
Copy Markdown
Contributor

Summary

Fixes #42

Internal links across multiple documentation pages were using absolute
paths (e.g. /asynchronous-work/...) which broke on the live site
because the docs are served under /learn/.

Rather than hardcoding /learn/ as a prefix, this PR converts all
internal links to relative paths, which are portable and work
regardless of the base URL.

Affected Pages

  • asynchronous-work/discover-promises-in-nodejs
  • asynchronous-work/understanding-processnexttick
  • asynchronous-work/overview-of-blocking-vs-non-blocking
  • diagnostics/live-debugging/index
  • diagnostics/live-debugging/using-inspector
  • diagnostics/memory/index
  • diagnostics/poor-performance/index
  • diagnostics/poor-performance/using-linux-perf
  • getting-started/how-much-javascript-do-you-need-to-know-to-use-nodejs
  • typescript/transpile
  • typescript/publishing-a-ts-package

Example

Before:

[event loop](/asynchronous-work/event-loop-timers-and-nexttick)

After:

[event loop](./event-loop-timers-and-nexttick)

Internal links were using absolute paths (e.g. /asynchronous-work/...)
which broke because the site is hosted under /learn/. Rather than
hardcoding /learn/ as a prefix, convert all internal links to relative
paths so they are portable and work regardless of the base URL.
Affected pages:
- asynchronous-work/discover-promises-in-nodejs
- asynchronous-work/understanding-processnexttick
- asynchronous-work/overview-of-blocking-vs-non-blocking
- diagnostics/live-debugging/index
- diagnostics/live-debugging/using-inspector
- diagnostics/memory/index
- diagnostics/poor-performance/index
- diagnostics/poor-performance/using-linux-perf
- getting-started/how-much-javascript-do-you-need-to-know-to-use-nodejs
- typescript/transpile
- typescript/publishing-a-ts-package
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nodejs-learn Canceled Canceled Apr 5, 2026 3:07pm

Request Review

Copy link
Copy Markdown
Member

@avivkeller avivkeller left a comment

Choose a reason for hiding this comment

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

Just add the /learn/

@srmaharana1999
Copy link
Copy Markdown
Contributor Author

Thanks for the feedback! I've updated all internal links to use the /learn/ absolute path prefix as suggested. The change is now pushed - please take another look when you get a chance.

@avivkeller avivkeller merged commit dbf0c8c into nodejs:main Apr 5, 2026
1 of 2 checks 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.

fix: internal doc links broken due to missing /learn/ base path

2 participants