Repository navigation
fix: rewrite relative links between docs pages (backport #40) - #41
Merged
barredterra merged 2 commits intoOct 29, 2026
Merged
Conversation
(cherry picked from commit 7222dda)
[Medium impact] The PR appears safe to merge; the backport route mismatch is fixed. Reviews (2) · Last reviewed commit: "fix: use the version-15 docs route in li..." · Reviewed by Greptile |
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #6
Problem
A Markdown link to a sibling page, such as
[Setup](setup.md), rendered as a literalhref="setup.md". The link did not resolve against the docs route. Also, the bundled docs linked to/app/docs/en/..., so every reader got the English page.Changes
rewrite_page_links()changes relative<a href="….md">links into the locale-neutral route/desk/docs/<path>. The docs browser then opens the page in the reader's language.index.mdfile is its own folder. The#fragmentstays on the link.guides/index.mdkeeps its relative links./,mailto:,#anchor, links to other file types, links with a?query, and links that go above the docs root./desk/docs/<path>without a locale.Tests
There are 3 new tests in
compendium/tests/test_docs.py:./,../,index.md,#fragmentand a German translationNotes
build_overview_payloadstill links to/app/docs/{locale}/.... This PR does not change it.index.mdbecomes/desk/docs. The docs browser then opens the first page.This is an automatic backport of pull request #40 done by [Mergify](https://mergify.com).