Repository navigation
fix: use root-relative path for quick start and documentation links - #620
Conversation
Signed-off-by: ish-g09 <ig.valiente09@gmail.com>
|
👋 @ish-g09 Welcome to the Microcks community! 💖 Thanks and congrats 🎉 for opening your first pull request here! Be sure to follow the pull request template or please update it accordingly. Hope you have a great time there! |
yada
left a comment
There was a problem hiding this comment.
Verification ✅
I built the site locally and ran the same internal link check as the weekly workflow (lychee --offline --include-fragments=anchor-only --index-files index.html --root-dir <public>) on the paginated pages, once on master and once with this PR applied.
Setup: Hugo 0.123.0 extended (the version pinned in netlify.toml), lychee 0.24.2.
Footer "Quick Start" link on /page/2/
| Rendered HTML | |
|---|---|
master |
href=./documentation/tutorials/getting-started/ |
| This PR | href=/documentation/tutorials/getting-started/ |
lychee on public/page/**/*.html
| Result | |
|---|---|
master |
14 errors, for example /page/9/documentation/tutorials/getting-started (File not found), on pages 2 to 15 |
| This PR | 0 errors (1821 links total, 1050 OK) |
The 14 errors on master match the 14 reported in #584. None remain with this change.
Root cause: the footer URL ./documentation/... goes through relLangURL, which leaves the ./ prefix untouched. On /page/N/ it therefore resolved to /page/N/documentation/.... A root-relative path resolves the same way from every page.
LGTM, safe to merge. Fixes #584.
|
🎉 @ish-g09 You are now a Microcks community contributor! 💖 Thanks and congrats 🚀 on merging your first pull request! We are delighted and very proud of you! 👏 📢 If you're using Microcks in your organization, please add your company name to this list. 🙏 It really helps the project to gain momentum and credibility. It's a small contribution back to the project with a big impact. If you need to know why and how to add yourself to the list, please read the blog post "Join the Microcks Adopters list and Empower the vibrant open source Community 🙌" Kudos and please keep going, we need you 🙌 |
Description
config/_default/menus.en.toml, thefooter_leftQuick Start link was configured as a relative path (./documentation/tutorials/getting-started/).relLangURLin the footer partial, the./prefix caused the browser and link checker to resolve the link relative to/page/X/(e.g./page/2/,/page/3/, up to/page/15/), generating non-existent paths likehttps://microcks.io/page/2/documentation/tutorials/getting-started/(404)./documentation/tutorials/getting-started/) so it stays consistent across all pages and pagination depths.content/_index.mdfrom./documentation/tutorials/getting-started/to/documentation/tutorials/getting-started/.Related issue(s)
Fixes #584
Testing
http://localhost:1313/page/2/.http://localhost:1313/documentation/tutorials/getting-started/rather than appending to/page/2/.