Skip to content

docs(gitbook): key redirects by old file path, drop self-redirects - #62

Merged
dakejahl merged 1 commit into
mainfrom
docs/fix-redirects
Aug 14, 2026
Merged

docs(gitbook): key redirects by old file path, drop self-redirects#62
dakejahl merged 1 commit into
mainfrom
docs/fix-redirects

Conversation

@dakejahl

Copy link
Copy Markdown
Collaborator

Summary

Fixes the redirects added in #61. 31 of the 58 changed URLs currently 404 on the live site.

Problem

Measured after #61 deployed: 27 of 58 old URLs resolve, 31 return 404. Every one that resolves is explained by GitBook's own page tracking — it follows a page when the file is unchanged (all 12 nav-only moves pass) or when it detects the rename (15 of 46 file moves). None of the configured redirects fired.

The block was keyed on site URLs rather than repo paths, emitted two keys per page, and included 12 self-redirects (path: path.md) for pages whose file never moved. GitBook documents the format as previous/page: new-folder/page.md — repo-relative file paths — so the extra forms were at best inert and the self-redirects plausibly invalidated the whole block.

Solution

One entry per genuine file move, keyed by the old repo-relative path with .md stripped and a README keyed by its directory. Self-redirects dropped, since those pages already resolve through page tracking.

Needs verification against the deployed site again after merge — the same 58 URLs, expecting 0 failures.

Verified against the deployed site: 31 of 58 changed URLs 404. Every URL
that still resolves does so through GitBook's own page tracking, which
follows a page when its file is unchanged or its rename is detected —
none of the configured redirects fired.

The block mixed two key forms per page and included 12 self-redirects for
pages whose file never moved, which likely invalidated it. Emit one entry
per genuine file move, keyed by the old repo-relative path, per the
documented format.
@dakejahl
dakejahl merged commit 4ee3769 into main Aug 14, 2026
2 checks passed
@dakejahl
dakejahl deleted the docs/fix-redirects branch August 14, 2026 21:58
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.

1 participant