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

SeverityEffect on the exit code
errorcheck and validate exit 1.
warningcheck --strict and validate --strict-warnings exit 1.
infoNone. 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.

CodeSeverityReported when
CB_PAGE_TITLE_MISSINGerrorAn indexable page has no <title>, or an empty one.
CB_PAGE_TITLE_DUPLICATEwarningTwo or more indexable pages that are their own canonical have the same title, compared without regard to case.
CB_PAGE_DESCRIPTION_MISSINGwarningAn indexable page has no meta description.
CB_PAGE_DESCRIPTION_DUPLICATEwarningTwo or more indexable pages that are their own canonical have the same meta description.
CB_PAGE_CANONICAL_MISSINGwarningAn indexable page has no <link rel="canonical">.
CB_PAGE_CANONICAL_ELSEWHEREwarningAn indexable page's canonical URL points to another built page.
CB_PAGE_CANONICAL_ORIGINwarningAn indexable page's canonical URL is on another origin than the site origin.
CB_PAGE_CANONICAL_NOT_BUILTerrorAn indexable page's canonical URL points to no built page, redirect, or host route.
CB_PAGE_H1_MISSINGwarningAn indexable page has no h1 heading.
CB_PAGE_H1_MULTIPLEwarningAn indexable page has more than one h1 heading.
CB_PAGE_IMAGE_ALT_MISSINGwarningAn <img> has no alt attribute.
CB_PAGE_STRUCTURED_DATA_INVALIDerrorA JSON-LD block does not parse.
CB_PAGE_BROWSER_RENDEREDwarningThe HTML has no headings and fewer than 50 characters of text, so the content renders only in the browser.
CB_PAGE_TITLE_MISMATCHwarningNeither the page's <title> nor the frontmatter title of its source document contains the other.
CB_PAGE_DESCRIPTION_MISMATCHwarningNeither the page's meta description nor the frontmatter description of its source document contains the other.
CB_PAGE_LINK_REQUIREDwarningThe 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_MINwarningThe page's content links to fewer other built pages than the minOutgoingLinks of its page type.
CB_PAGE_INCOMING_LINKS_MINwarningFewer built pages link to the page from their content than the minIncomingLinks of its page type.

Links on the built pages, checked against the pages, ids, and files of the build.

CodeSeverityReported when
CB_LINK_PAGE_MISSINGerrorAn internal link points to no built page, redirect, or host route.
CB_LINK_ANCHOR_MISSINGerrorA link's #fragment names an id that the target page does not have.
CB_LINK_FILE_MISSINGerrorA 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_TARGETinfoAn 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.

CodeSeverityReported when
CB_SITE_HREFLANG_NOT_RECIPROCALwarningAn hreflang alternate points to no built page, or to a page that lists no alternate back to this one.
CB_SITE_HREFLANG_X_DEFAULT_MISSINGwarningA page lists two or more hreflang alternates, and none of them is x-default.
CB_SITE_SITEMAP_URL_NOT_BUILTerrorThe sitemap lists a URL on another origin, or a URL that resolves to no built page.
CB_SITE_SITEMAP_PAGE_MISSINGwarningAn indexable page that is its own canonical is not in the sitemap.
CB_SITE_SITEMAP_NOINDEXwarningThe sitemap lists a page marked noindex.
CB_SITE_SOURCE_NOT_BUILTerrorlinks.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-seo also 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 the CB_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.

CodeSeverityReported when
CB_TITLE_DUPLICATEwarningTwo files have the same frontmatter title. With a build: CB_PAGE_TITLE_DUPLICATE.
CB_DESCRIPTION_DUPLICATEwarningTwo files have the same frontmatter description. With a build: CB_PAGE_DESCRIPTION_DUPLICATE.
CB_H1_MULTIPLEwarningA file has more than one # heading. With a build: CB_PAGE_H1_MULTIPLE.
CB_HEADING_LEVEL_SKIPPEDwarningA heading is more than one level deeper than the heading before it.
CB_LOCALE_KEY_MISSINGwarningIn a project with two or more locales, a localized page with a slug has no key.
CB_LOCALE_KEY_INCOMPLETEwarningA key that localized pages share has no page in one or more of the locales.
CB_MARKDOWN_LINK_UNRESOLVEDwarningA 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.

CodeSeverityReported when
CB_IMAGE_ALT_MISSINGinfoA 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.

CodeSeverityReported when
CB_SEO_CONFIG_INVALIDerrorThe SEO config does not match its schema. No other SEO finding is reported.
CB_SEO_PAGE_ID_DUPLICATEwarningTwo pages, written or planned, have the same SEO page id: the key, or the slug when there is no key.
CB_SEO_TYPE_MISSINGwarningA page gets no SEO page type from its frontmatter, a pages entry, or pageDefaults.
CB_SEO_TYPE_UNKNOWNwarningA page's type is not in pageTypes.
CB_SEO_FRONTMATTER_MISSINGwarningA field that requiredFrontmatter names is missing or empty.
CB_SEO_SECTION_MISSINGwarningThe outline has none of the headings of a requiredSections entry.
CB_SEO_BLOCK_REQUIREDwarningThe page does not use a block that requiredBlocks names.
CB_SEO_BLOCK_RECOMMENDEDinfoThe 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.

CodeSeverityReported when
CB_CONFIG_IGNORE_UNUSEDwarningAn 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.

CodeSeverityReported when
CB_SKILL_DRIFTwarningAn 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.

CodeSeverityReported when
CB_UNCLOSED_BLOCKerrorA block is still open at the end of the document.
CB_UNMATCHED_CLOSEwarningA closing ::: fence has no open block.
CB_FENCE_MISMATCHwarningA closing fence has another number of colons than the fence that opened the block.
CB_CHILD_OUTSIDE_BLOCKwarningA ::child line sits outside a container block, so it stays plain text.
CB_PROPS_SYNTAXerrorA block's {...} props do not parse: a } is missing, a string is not closed, or a value is missing or invalid.
CB_URL_PROTOCOLerrorA link or image URL uses a protocol other than http:, https:, or mailto:.
CB_UNKNOWN_BLOCKerrorThe registry has no block with this name.
CB_UNKNOWN_PROPerrorA block has a prop that its schema does not declare.
CB_PROPS_INVALIDerrorA prop value fails the block's schema.
CB_NESTING_DEPTHerrorBlocks are nested more than 4 levels deep.
CB_CHILD_ONLYerrorA child block, such as tab or faq-item, is used outside its container.
CB_BODY_EMPTYerrorA block that needs a body has none.
CB_BODY_LENGTHwarningA block's body is shorter or longer than its content model allows.
CB_ROW_SYNTAXwarningA line in a block of rows does not start with - , so the block ignores it.
CB_ROW_COLUMNSerrorA row has fewer or more | cells than the block has columns.
CB_ROW_COUNTerrorA block of rows has fewer or more rows than it allows.
CB_ITEM_SYNTAXwarningA line in a list block does not use the list marker the block expects, so the block ignores it.
CB_ITEM_COUNTerrorA list block has fewer or more items than it allows.
CB_UNEXPECTED_CONTENTwarningA container block holds loose text between its children, and the block ignores it.
CB_CHILD_NOT_ALLOWEDerrorA container block holds a child block it does not accept.
CB_CHILD_MISSINGerrorA container block lacks a child block it requires.
CB_CHILD_COUNTerrorA container block has fewer or more children than it allows.

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.

CodeSeverityReported when
CB_LINK_SHAPEerrorThe link frontmatter of a file does not match its schema.
CB_SLUG_DUPLICATEerrorTwo files declare the same slug in the same locale.
CB_KEY_MISSINGerrorWith links.resolve set to same-locale-key, a file with a slug has no key.
CB_KEY_DUPLICATEerrorTwo files declare the same key in the same locale.
CB_ALIAS_CONFLICTerrorTwo files declare the same alias, or an alias matches a page's slug or key.
CB_LINK_SELFwarningA linksTo target is the page itself.
CB_LINK_CROSS_LOCALEwarningA linksTo target resolves to a page in another locale.
CB_LINK_LOCALE_MISSINGerrorA linksTo target exists in another locale, and not in the page's own locale.
CB_LINK_UNRESOLVEDerrorA linksTo target matches no page's slug, key, or alias.
CB_LINK_ORPHANwarningNo other page names this page in its linksTo.