Commit 0f911eb
docs(og): pin the OG card URL's dotted final segment, and name the coupling on both sides (#13702)
`getPageImage()` in `apps/docs/lib/source.ts` appends an `image.png` marker to
every Open Graph card URL. That marker is load-bearing twice, and only the first
is visible from the code: the OG route slices it off to resolve the page, and
its DOT is what keeps the URL out of `proxy.ts`'s locale rewriter (the matcher
excludes any path containing a dot). Measured: `/og/docs/ai/agents` is rewritten
to `/en/og/docs/ai/agents`, which is not a route; `/og/docs/ai/agents/x.png` is
not rewritten. The marker's name is free; its dot is not.
Both halves:
- Cross-referencing comments on each side, each naming the other file and what
breaks.
- `check-docs-locale-catch-all` gains a limb asserting that the URL
`getPageImage()` builds ends in a final segment containing a dot. It reads the
marker AND the template that turns the array into the URL, so the assertion
cannot survive as a check on a variable that no longer reaches the URL. The
matcher-excludes-dots half is the condition the script already reads; it is
reported in the summary, not re-asserted.
Claude-Session: https://claude.ai/code/session_01Pk26oZ12t5N1hwGW1m1MgC
Co-authored-by: Claude <noreply@anthropic.com>1 parent 43fa989 commit 0f911eb
4 files changed
Lines changed: 297 additions & 12 deletions
File tree
- .github/workflows
- apps/docs
- lib
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1460 | 1460 | | |
1461 | 1461 | | |
1462 | 1462 | | |
| 1463 | + | |
| 1464 | + | |
| 1465 | + | |
| 1466 | + | |
| 1467 | + | |
| 1468 | + | |
| 1469 | + | |
| 1470 | + | |
| 1471 | + | |
| 1472 | + | |
1463 | 1473 | | |
1464 | 1474 | | |
1465 | 1475 | | |
1466 | | - | |
1467 | | - | |
1468 | | - | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
1469 | 1480 | | |
1470 | 1481 | | |
1471 | 1482 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
18 | 43 | | |
19 | 44 | | |
20 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
111 | 129 | | |
112 | 130 | | |
0 commit comments