Diagnostics
Every content and navigation code, and how to fix it.
Diagnostics point at a source location, e.g. source/docs/guides/attachments.md:42:7, or a config path, e.g. config#/navigation/1/items/0. Messages never quote your content. validate reports every problem in one run.
| Code | Level | Fix |
|---|---|---|
ROUTE_SLUG_INVALID | error | Rename the file to lowercase-hyphen |
ROUTE_COLLISION | error | Keep one of page.md / page.mdx |
CONTENT_FRONTMATTER_MISSING | error | Add a --- block with title |
CONTENT_FRONTMATTER_UNKNOWN_FIELD | error | Remove the key |
CONTENT_FRONTMATTER_INVALID | error | Check types; title not empty |
CONTENT_HEADING_H1 | error | Start the body at ## |
CONTENT_HEADING_SKIPPED | warning | Do not skip heading levels |
CONTENT_HTML_FORBIDDEN | error | Use Markdown or a component |
CONTENT_EXPRESSION_FORBIDDEN | error | Use string props |
CONTENT_ESM_FORBIDDEN | error | Remove import/export |
CONTENT_UNSUPPORTED | error | Footnotes, ref links, inline images |
CONTENT_COMPONENT_UNKNOWN | error | Check name and casing |
CONTENT_COMPONENT_PROP_INVALID | error | Remove unsupported props |
CONTENT_COMPONENT_NESTING_INVALID | error | Check allowed children / Hero first |
CONTENT_LINK_TARGET_MISSING | error | Fix the route or operation slug |
CONTENT_LINK_ANCHOR_MISSING | warning | Fix the #anchor |
CONTENT_LINK_SCHEME_FORBIDDEN | error | Use https:, mailto: or a route |
CONTENT_ASSET_NOT_FOUND | error | Check the relative path |
CONTENT_ASSET_UNSUPPORTED | error | PNG, JPEG, WebP or GIF |
CONTENT_ASSET_TOO_LARGE | error | ≤ 2 MiB each, 20 MiB total |
CONTENT_BUDGET_EXCEEDED | error | Split the page |
NAVIGATION_PAGE_MISSING | error | Fix the slug |
NAVIGATION_PAGE_DUPLICATE | error | List each page once |
NAVIGATION_PAGE_ORPHANED | warning | Add it, or leave it hidden |
NAVIGATION_DEPTH_EXCEEDED | error | Two section levels max |
NAVIGATION_API_DUPLICATE | error | One { api: true } |
NAVIGATION_LINK_INVALID | error | Use https:// or http:// |