Repository navigation
docs(middleware): add custom recovery behavior page across all locales - #414
Merged
Merged
Conversation
- Document gin.CustomRecovery for customizing panic recovery handling - Add the page to all 12 locales with a runnable example and Try it section - Insert at sidebar order 4 after Custom Middleware - Renumber later middleware pages consistently across every locale
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.
Summary
The upstream Gin docs (
doc.md) include a "Custom Recovery behavior" section (gin.CustomRecovery) that was the only topic with no equivalent on this site. This PR adds that page across all 12 locales and inserts it into the Middleware sidebar right after Custom Middleware.A full cross-check of
doc.mdagainstsrc/content/docs/en/confirmed every other upstream section is already covered — this was the single gap.Architecture / flow
The change adds one new page and shifts the
sidebar.orderof the later Middleware pages by +1 (consistently in every locale) to open the order=4 slot:flowchart TD A[1 · without-middleware] --> B[2 · using-middleware] B --> C[3 · custom-middleware] C --> NEW[4 · custom-recovery] NEW --> D[5 · error-handling-middleware] D --> E[6 · using-basicauth-middleware] E --> F[7 · index] F --> G[8 · goroutines-inside-a-middleware] G --> H[9 · security-headers] H --> I[10 · security-guide] I --> J[11 · session-management] J --> K[12 · dependency-injection] style NEW fill:#dff0d8,stroke:#3c763dNew page (green) inserted at order 4; pages 5–12 are the renumbered existing files (was 4–11). Same numbering applied identically across all 12 locales to preserve the cross-locale order invariant established in
d6142b754b.AI Authorship
custom-recovery.mdpages (English written, then translated per-locale by sub-agents matching each locale's existing terminology/conventions) and the 96 one-lineorder:frontmatter bumpsChange classification
Plan reference
Goal: close the one content gap between upstream
gin/docs/doc.mdand this site's English docs, keeping all locales and sidebar ordering in sync. Scope: middleware docs only — addcustom-recovery.md×12 + renumber siblingorder:×12 locales. No code/config changes.Verification
npm run build→ 1226 pages built, no errors (only benign Pagefind stemming notes). Confirms frontmatter and internal links are valid.npm run dev, open/en/docs/middleware/custom-recovery/, confirm the page renders and appears 4th in the Middleware sidebar; spot-check one RTL locale (/ar/or/fa/).Verifiability check
## Try itsection uses H2 per site convention;## See alsocross-links use correct per-locale prefixes (verified: no/en/leaks in translated files)Risk & rollback
f183515fc3.Reviewer guide
en/docs/middleware/custom-recovery.md(source of truth for all translations).custom-recovery.mdfiles (mechanical translations of the English source) and the 96order:bumps (uniform +1, build-verified contiguous 1–12 in every locale).