Skip to content

Commit 269103b

Browse files
louis-preclaude
andcommitted
docs: Clarify redirect management for same-site vs cross-site moves
Document that GitBook auto-redirects are unreliable and should not be relied upon. Same-site redirects go in .gitbook.yaml, cross-site redirects must be configured in the GitBook UI. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 7209b6e commit 269103b

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

CLAUDE.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,10 @@ See the [Architecture](#architecture) section above for the three GitBook site c
367367

368368
### Redirect Management
369369

370-
Each `.gitbook.yaml` contains redirects maintaining backward compatibility. When restructuring, always add redirects in the appropriate site's config.
370+
There are two ways to handle redirects. Always use one of these explicitly — do not rely on GitBook's automatic redirects, as they are unreliable.
371+
372+
- **Within the same site:** Add redirects manually in the site's `.gitbook.yaml`.
373+
- **Across site sections:** `.gitbook.yaml` redirects are scoped to their own site and cannot point to pages in a different site. Cross-site redirects must be configured at the site level from within the GitBook UI.
371374

372375
---
373376

@@ -727,7 +730,7 @@ To follow this guide, you need:
727730

728731
7. **Real-world focus:** Include sandbox credentials, troubleshooting guides, and production checklists. Developers need practical, actionable information.
729732

730-
8. **Link maintenance:** When restructuring, always add redirects in `.gitbook.yaml` to maintain backward compatibility.
733+
8. **Link maintenance:** When restructuring within a site, add redirects in `.gitbook.yaml`. For cross-site moves, configure redirects in the GitBook UI. Do not rely on GitBook's automatic redirects.
731734

732735
9. **Do not modify file URLs in SUMMARY.md.** Renaming or moving page URLs via SUMMARY.md can break GitBook sync. Use the GitBook UI to rename or move pages instead.
733736

@@ -751,7 +754,7 @@ When creating or updating documentation:
751754
- [ ] Keep paragraphs short (2-3 sentences)
752755
- [ ] Use active voice and second person
753756
- [ ] Add entry to SUMMARY.md if creating new page
754-
- [ ] Update .gitbook.yaml redirects if restructuring
757+
- [ ] Add explicit redirects if restructuring (`.gitbook.yaml` for same-site, GitBook UI for cross-site — do not rely on auto-redirects)
755758

756759
### Common Terminology
757760

0 commit comments

Comments
 (0)