Docs: use relative cross-doc links now that website#4385 has landed
Nobody has claimed this yet.
- Dominant language
- Nextflow
- Stars
- 12
- Forks
- 6
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 8
Description
Background
nf-core/website#4385 was merged on 2026-09-02 and fixes nf-core/website#4384.
Until then, relative links between a pipeline's own docs pages 404'd on the website.
Docs pages are served at trailing-slash URLs (/magmap/dev/docs/output/), and the site's markdown rewriter only stripped the .md extension, leaving the href relative.
So usage.md#anchor written in docs/output.md resolved one level too deep, to /magmap/dev/docs/output/usage, which does not exist.
GitHub rendered the same source correctly, which is why this went unnoticed for years.
Because of that, several nf-core pipelines — magmap included — write cross-references between their own docs pages as absolute https://nf-co.re/... URLs instead.
That is no longer necessary, and the relative form is now strictly better.
See nf-core/phyloplace#83 for the same cleanup on phyloplace, with the fuller write-up.
What works now
A relative link to another docs/*.md page is rewritten at build time into a root-relative, version-preserving URL:
docs/output.md: [Choosing an annotator](usage.md#choosing-an-annotator-prokka-or-bakta)
read on /magmap/dev/docs/output/ -> /magmap/dev/docs/usage/#choosing-an-annotator-prokka-or-bakta
read on /magmap/1.0.0/docs/output/ -> /magmap/1.0.0/docs/usage/#choosing-an-annotator-prokka-or-bakta
The reader stays on whichever version channel they were browsing, and the link still renders correctly on GitHub.
This is preventive, not a bug fix
magmap has no broken links today.
Both cross-doc anchors currently resolve on the released pages:
released magmap output page, #summary-tables present=1
released magmap usage page, #choosing-an-annotator-prokka-or-bakta present=1
The reason to change them anyway is that an absolute https://nf-co.re/magmap/<page> link always resolves to the released docs.
The moment one of these anchors points at a section that only exists on dev, the link starts returning 200 and silently dropping the reader at the top of the page with no anchor jump — a failure nobody reports, because it does not look like an error.
That has already happened on phyloplace; see #83 for the evidence.
Doing it now, while both links happen to work, is cheap and means the trap is not there later.
What to change
Two links, both cross-references between our own docs pages:
| file | line | current target | should become |
|---|---|---|---|
docs/usage.md |
330 | https://nf-co.re/magmap/output#summary-tables |
output.md#summary-tables |
docs/output.md |
126 | https://nf-co.re/magmap/usage#choosing-an-annotator-prokka-or-bakta |
usage.md#choosing-an-annotator-prokka-or-bakta |
Line numbers are against dev at the time of writing; grep for the URLs rather than trusting them.
What to leave absolute
- The ~12
https://nf-co.re/magmap/parameters/#...links indocs/usage.mdanddocs/output.md.
The parameters page is generated fromnextflow_schema.jsonand has no markdown source file, so there is no relative form to write.
It has the same version-pinning weakness — an anchor for a parameter added ondevwill not resolve until release — but nothing in this repo can fix that. - The results page and anything else outside
docs/. - The template banner at the top of
docs/usage.md(## :warning: Please read this documentation on the nf-core website: ...).
It is deliberately absolute, since its job is to move a reader off GitHub, and it is template boilerplate. - Links in
README.mdanddocs/CONTRIBUTING.md, which are read mostly on GitHub.
How to verify
The website deploys on its own schedule and /dev/ docs lag a merge, so check after a deploy rather than immediately.
- Open
https://nf-co.re/magmap/dev/docs/output/— note the trailing slash, which is the form the docs tabs link to and the one where the old bug appeared. - Click each changed link.
- Each should land on the matching
/magmap/dev/docs/<page>/#<anchor>and scroll to the section, staying ondev.
Checking from https://nf-co.re/magmap/output (short, no trailing slash) is not a valid test: relative links resolved correctly from that URL form even while the bug was live, which is exactly why it stayed hidden.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Search docs/usage.md and docs/output.md for the two https://nf-co.re/magmap links identified in the issue. Replace only the cross-document links with the specified relative targets, leaving parameters, results, template, README.md, and CONTRIBUTING.md links unchanged. After a website deploy, verify from the trailing-slash /magmap/dev/docs/ pages that both links preserve dev and reach their anchors.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 92/100