Finding codes
Every code that contentbit check, validate, and Studio report, with its severity and what makes contentbit report it.
Every finding has a stable code. check --json and validate print it, and
an agent or a CI script can match on it. For the same list in plain words,
read What check looks for.
Severities
| Severity | Effect on the exit code |
|---|---|
error | check and validate exit 1. |
warning | check --strict and validate --strict-warnings exit 1. |
info | None. check prints it and leaves it out of the counts. |
These are the defaults. Ignore a finding shows how to change one in the config.
Built-page findings
check and Studio read these from the build folder, and
contentbit context <page> lists the ones of its page.
Page findings
What one built page serves: its title, description, canonical URL, headings, images, structured data, and the contract of its SEO page type.
| Code | Severity | Reported when |
|---|---|---|
CB_PAGE_TITLE_MISSING | error | An indexable page has no <title>, or an empty one. |
CB_PAGE_TITLE_DUPLICATE | warning | Two or more indexable pages that are their own canonical have the same title, compared without regard to case. |
CB_PAGE_DESCRIPTION_MISSING | warning | An indexable page has no meta description. |
CB_PAGE_DESCRIPTION_DUPLICATE | warning | Two or more indexable pages that are their own canonical have the same meta description. |
CB_PAGE_CANONICAL_MISSING | warning | An indexable page has no <link rel="canonical">. |
CB_PAGE_CANONICAL_ELSEWHERE | warning | An indexable page's canonical URL points to another built page. |
CB_PAGE_CANONICAL_ORIGIN | warning | An indexable page's canonical URL is on another origin than the site origin. |
CB_PAGE_CANONICAL_NOT_BUILT | error | An indexable page's canonical URL points to no built page, redirect, or host route. |
CB_PAGE_H1_MISSING | warning | An indexable page has no h1 heading. |
CB_PAGE_H1_MULTIPLE | warning | An indexable page has more than one h1 heading. |
CB_PAGE_IMAGE_ALT_MISSING | warning | An <img> has no alt attribute. |
CB_PAGE_STRUCTURED_DATA_INVALID | error | A JSON-LD block does not parse. |
CB_PAGE_BROWSER_RENDERED | warning | The HTML has no headings and fewer than 50 characters of text, so the content renders only in the browser. |
CB_PAGE_TITLE_MISMATCH | warning | Neither the page's <title> nor the frontmatter title of its source document contains the other. |
CB_PAGE_DESCRIPTION_MISMATCH | warning | Neither the page's meta description nor the frontmatter description of its source document contains the other. |
CB_PAGE_LINK_REQUIRED | warning | The page's content has no link to a page that its SEO page type names in requiredLinksTo, or no built page has that key or slug. |
CB_PAGE_OUTGOING_LINKS_MIN | warning | The page's content links to fewer other built pages than the minOutgoingLinks of its page type. |
CB_PAGE_INCOMING_LINKS_MIN | warning | Fewer built pages link to the page from their content than the minIncomingLinks of its page type. |
Link findings
Links on the built pages, checked against the pages, ids, and files of the build.
| Code | Severity | Reported when |
|---|---|---|
CB_LINK_PAGE_MISSING | error | An internal link points to no built page, redirect, or host route. |
CB_LINK_ANCHOR_MISSING | error | A link's #fragment names an id that the target page does not have. |
CB_LINK_FILE_MISSING | error | A link to a file, such as a PDF or a .md file, points to a file that is not in the build. |
CB_LINK_NOINDEX_TARGET | info | An indexable page links to a page marked noindex. |
Site findings
What several pages must agree on: hreflang alternates, the sitemap, and the Markdown documents that page routes expect.
| Code | Severity | Reported when |
|---|---|---|
CB_SITE_HREFLANG_NOT_RECIPROCAL | warning | An hreflang alternate points to no built page, or to a page that lists no alternate back to this one. |
CB_SITE_HREFLANG_X_DEFAULT_MISSING | warning | A page lists two or more hreflang alternates, and none of them is x-default. |
CB_SITE_SITEMAP_URL_NOT_BUILT | error | The sitemap lists a URL on another origin, or a URL that resolves to no built page. |
CB_SITE_SITEMAP_PAGE_MISSING | warning | An indexable page that is its own canonical is not in the sitemap. |
CB_SITE_SITEMAP_NOINDEX | warning | The sitemap lists a page marked noindex. |
CB_SITE_SOURCE_NOT_BUILT | error | links.routes gives a published Markdown document a route, and the build has no page, redirect, or host route at that route. |
How built-page findings are counted
- Template findings. A page finding that the same layout element gives on two or more pages is reported once, with every page it affects. A finding with no element, such as a sitemap finding, is reported on each page.
- Layout titles. When the layout renders one title or description in place of each document's own, the mismatch is one template finding, and those pages report no duplicate of it.
- Stale builds. When a Markdown document changed after the build, every built-page error at that document or on its page is a warning, since a rebuild may clear it.
--strict-seo.check --strict-seoalso exits 1 on the warnings of an SEO page type:CB_PAGE_LINK_REQUIRED,CB_PAGE_OUTGOING_LINKS_MIN,CB_PAGE_INCOMING_LINKS_MIN, and theCB_SEO_warnings.
Markdown findings
These come from the Markdown files that content in contentbit.config.ts
lists. check prints them after the built-page findings. The last two
groups concern only projects that use typed blocks or validate.
Content integrity
check and Studio report these across the Markdown files. With a build, check reports four of them from the built pages instead, with the code the table names.
| Code | Severity | Reported when |
|---|---|---|
CB_TITLE_DUPLICATE | warning | Two files have the same frontmatter title. With a build: CB_PAGE_TITLE_DUPLICATE. |
CB_DESCRIPTION_DUPLICATE | warning | Two files have the same frontmatter description. With a build: CB_PAGE_DESCRIPTION_DUPLICATE. |
CB_H1_MULTIPLE | warning | A file has more than one # heading. With a build: CB_PAGE_H1_MULTIPLE. |
CB_HEADING_LEVEL_SKIPPED | warning | A heading is more than one level deeper than the heading before it. |
CB_LOCALE_KEY_MISSING | warning | In a project with two or more locales, a localized page with a slug has no key. |
CB_LOCALE_KEY_INCOMPLETE | warning | A key that localized pages share has no page in one or more of the locales. |
CB_MARKDOWN_LINK_UNRESOLVED | warning | A relative link to a .md or .mdx file matches no scanned file. With a build: CB_LINK_FILE_MISSING. |
Content suggestions
check and Studio report these as suggestions. They never change the exit code.
| Code | Severity | Reported when |
|---|---|---|
CB_IMAGE_ALT_MISSING | info | A Markdown image has no alt text. With a build: CB_PAGE_IMAGE_ALT_MISSING. |
SEO contract findings
check and Studio report these when the project has an SEO config. The links that a page type asks for are counted on the built pages, and reported with the CB_PAGE_ codes.
| Code | Severity | Reported when |
|---|---|---|
CB_SEO_CONFIG_INVALID | error | The SEO config does not match its schema. No other SEO finding is reported. |
CB_SEO_PAGE_ID_DUPLICATE | warning | Two pages, written or planned, have the same SEO page id: the key, or the slug when there is no key. |
CB_SEO_TYPE_MISSING | warning | A page gets no SEO page type from its frontmatter, a pages entry, or pageDefaults. |
CB_SEO_TYPE_UNKNOWN | warning | A page's type is not in pageTypes. |
CB_SEO_FRONTMATTER_MISSING | warning | A field that requiredFrontmatter names is missing or empty. |
CB_SEO_SECTION_MISSING | warning | The outline has none of the headings of a requiredSections entry. |
CB_SEO_BLOCK_REQUIRED | warning | The page does not use a block that requiredBlocks names. |
CB_SEO_BLOCK_RECOMMENDED | info | The page does not use a block that recommendedBlocks names. |
Check settings
check and Studio report this for the check field of contentbit.config.ts. Only check.severity can turn it off.
| Code | Severity | Reported when |
|---|---|---|
CB_CONFIG_IGNORE_UNUSED | warning | An entry of check.ignore matches no finding. An entry for built-page codes only is not judged without a build, and an entry for other codes only, without Markdown. |
Agent guidance
check and Studio report this for the Claude Code skills that contentbit agents installs.
| Code | Severity | Reported when |
|---|---|---|
CB_SKILL_DRIFT | warning | An installed contentbit-author or contentbit-audit skill has another version than the one the CLI ships. Run contentbit agents to refresh it. |
Block validation
validate reports these for the directive blocks of a Markdown file. check, context, and Studio report them in a project that defines blocks: its config names a registry or sets genericBlocks: true.
| Code | Severity | Reported when |
|---|---|---|
CB_UNCLOSED_BLOCK | error | A block is still open at the end of the document. |
CB_UNMATCHED_CLOSE | warning | A closing ::: fence has no open block. |
CB_FENCE_MISMATCH | warning | A closing fence has another number of colons than the fence that opened the block. |
CB_CHILD_OUTSIDE_BLOCK | warning | A ::child line sits outside a container block, so it stays plain text. |
CB_PROPS_SYNTAX | error | A block's {...} props do not parse: a } is missing, a string is not closed, or a value is missing or invalid. |
CB_URL_PROTOCOL | error | A link or image URL uses a protocol other than http:, https:, or mailto:. |
CB_UNKNOWN_BLOCK | error | The registry has no block with this name. |
CB_UNKNOWN_PROP | error | A block has a prop that its schema does not declare. |
CB_PROPS_INVALID | error | A prop value fails the block's schema. |
CB_NESTING_DEPTH | error | Blocks are nested more than 4 levels deep. |
CB_CHILD_ONLY | error | A child block, such as tab or faq-item, is used outside its container. |
CB_BODY_EMPTY | error | A block that needs a body has none. |
CB_BODY_LENGTH | warning | A block's body is shorter or longer than its content model allows. |
CB_ROW_SYNTAX | warning | A line in a block of rows does not start with - , so the block ignores it. |
CB_ROW_COLUMNS | error | A row has fewer or more | cells than the block has columns. |
CB_ROW_COUNT | error | A block of rows has fewer or more rows than it allows. |
CB_ITEM_SYNTAX | warning | A line in a list block does not use the list marker the block expects, so the block ignores it. |
CB_ITEM_COUNT | error | A list block has fewer or more items than it allows. |
CB_UNEXPECTED_CONTENT | warning | A container block holds loose text between its children, and the block ignores it. |
CB_CHILD_NOT_ALLOWED | error | A container block holds a child block it does not accept. |
CB_CHILD_MISSING | error | A container block lacks a child block it requires. |
CB_CHILD_COUNT | error | A container block has fewer or more children than it allows. |
Frontmatter links
validate reports these for the slug, key, linksTo, and aliases frontmatter, when at least one file declares a slug. check, context, and Studio read links from the built pages instead, so the check settings do not take these codes.
| Code | Severity | Reported when |
|---|---|---|
CB_LINK_SHAPE | error | The link frontmatter of a file does not match its schema. |
CB_SLUG_DUPLICATE | error | Two files declare the same slug in the same locale. |
CB_KEY_MISSING | error | With links.resolve set to same-locale-key, a file with a slug has no key. |
CB_KEY_DUPLICATE | error | Two files declare the same key in the same locale. |
CB_ALIAS_CONFLICT | error | Two files declare the same alias, or an alias matches a page's slug or key. |
CB_LINK_SELF | warning | A linksTo target is the page itself. |
CB_LINK_CROSS_LOCALE | warning | A linksTo target resolves to a page in another locale. |
CB_LINK_LOCALE_MISSING | error | A linksTo target exists in another locale, and not in the page's own locale. |
CB_LINK_UNRESOLVED | error | A linksTo target matches no page's slug, key, or alias. |
CB_LINK_ORPHAN | warning | No other page names this page in its linksTo. |