You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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>
Copy file name to clipboardExpand all lines: CLAUDE.md
+6-3Lines changed: 6 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -367,7 +367,10 @@ See the [Architecture](#architecture) section above for the three GitBook site c
367
367
368
368
### Redirect Management
369
369
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.
371
374
372
375
---
373
376
@@ -727,7 +730,7 @@ To follow this guide, you need:
727
730
728
731
7.**Real-world focus:** Include sandbox credentials, troubleshooting guides, and production checklists. Developers need practical, actionable information.
729
732
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.
731
734
732
735
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.
733
736
@@ -751,7 +754,7 @@ When creating or updating documentation:
751
754
-[ ] Keep paragraphs short (2-3 sentences)
752
755
-[ ] Use active voice and second person
753
756
-[ ] 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)
0 commit comments