Commit 08158e9
test(website): guard the mechanical MDX authoring rules the audit fixed by hand (#1061)
* fix(website): read a frontmatter description that contains an apostrophe
The description value pattern excluded every quote character, so any
`description:` holding a possessive never matched. Nine docs pages
declared a description and silently shipped the first-paragraph fallback
instead. Capture the value whole and strip only a matched pair of
surrounding quotes.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* refactor(website): delete the Card icon prop, which had no icon lookup
`Card` rendered `{icon}` straight into a div, so `icon="rocket"` printed
the word "rocket" above the title. Nothing looked the value up. Remove
the prop, its `.mdx-card-icon` rule, and the four glyph icons the two
interrupt blog posts passed; the cards keep their title and arrow.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* docs: keep every meta description inside the clamp
Nine descriptions ran past META_DESCRIPTION_MAX and were truncated
mid-sentence by clampMetaDescription(). Trim each to say the same thing
in under 160 characters.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* test(website): guard the four mechanical MDX authoring rules
The accuracy audit fixed roughly 160 wrong claims by hand; several of the
defect classes render fine and return silently. Walk `content/**` and
fail with the offending `path:line` when a page:
- passes an `icon` prop to `Card`, which does not accept one;
- (docs only) declares no frontmatter `description`, or one long enough
that `clampMetaDescription()` truncates it;
- gives `Callout` a `type` outside the union, read out of Callout.tsx so
the guard cannot drift from the component;
- (docs only) uses a contraction. The patterns match no possessive, and
the `## What's Next` heading is exempt structurally, not by file list.
Each detector also has a unit test over synthetic content, so a rule that
stops firing fails rather than passing vacuously.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>1 parent 2cba7b4 commit 08158e9
16 files changed
Lines changed: 365 additions & 23 deletions
File tree
- apps/website
- content
- blog
- docs
- ag-ui/guides
- chat/guides
- langgraph
- concepts
- guides
- render/api
- src
- components/docs/mdx
- lib
- styles
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
0 commit comments