:::contentbit

Build programmatic SEO pages that stay consistent.

Define reusable page contracts, give agents a brief for every page, and validate content structure and internal links before publishing.

$ pnpm dlx contentbit@latest init --seo

TypeScript · React · Astro · plain Markdown · MIT licensed

Choose your starting point

Add the toolkit or start from the reference application.

Contentbit can meet an established Markdown library where it is, or give a new Astro project a production-shaped SEO foundation. Both paths use the same portable contracts and quality gates.

Existing content library

Adopt without changing files

Scan current Markdown, integrity issues, locale coverage, and inferred contracts. The adoption report is read-only until you choose what to keep.

contentbit adopt "content/**/*.md" --dry-runFollow the adoption guide

New Astro application

Start from the production reference

Use the separate multilingual Astro template with routes, metadata, structured data, feeds, social images, Studio, Doctor, and CI already connected.

github.com/agonist/astro-speedrun-seoExplore the Astro template

01·The workflow

One contract, every page in the family

Model the repeatable shape once. Contentbit turns it into a page brief before writing and a quality gate after writing.

contentbit project4 page families128 planned pagescontracts loaded
contentbit.seo.config.ts
pageTypes: {  alternative: {    requiredSections: [      'overview',      'comparison',      'faq',    ],    minOutgoingLinks: 3  }}
one contract for every alternative page
contentbit brief semrush-alternatives

target

Semrush alternatives

commercial comparison · planned

writing contract

  • Target “semrush alternatives”
  • Include comparison + FAQ
  • Link to seo-tools-comparison
ready for an agent or writer
contentbit doctor --strict-seo
semrush.mdready
frontmattercomplete
required sections3 / 3
structured blocks2 / 2
internal links4 resolved
0 errors · safe to publish
plan
write
validate
publish

Model page families

Turn alternatives, glossaries, comparisons, and guides into reusable content contracts.

Brief every page

Give writers and agents the exact intent, sections, blocks, keywords, and links to satisfy.

Enforce the contract

Run the same structural, block, and link checks locally, in agent loops, and in CI.

02·Brief before prompt

Agents write inside the plan

The agent gets live block instructions and the target page brief before it drafts. It knows what to include, where to link, and what clean means.

Agent integration guide
agent · content/alternatives
>write the planned Semrush alternatives page
Skill: contentbit-author
$ contentbit brief semrush-alternatives --jsonexit 0
type: alternative · intent: commercialsections: overview, comparison, faqlinksTo: seo-tools-comparison
Writing the page from the brief with comparison and FAQ blocks, then checking the project.
$ contentbit doctor --strict-seoexit 1
CB_SEO_LINK_REQUIRED content/alternatives/semrush.mdmissing required link: seo-tools-comparison
The draft is structurally complete but missing its hub link. Adding it and checking again.
$ contentbit doctor --strict-seoexit 0
32 pages · 0 errors · 0 required SEO findings

03·The quality gate

Catch content drift before your users do

A page can be valid Markdown and still fail the program. Doctor turns your page-family contract, block schemas, and link graph into one ranked repair plan.

  • Readable diagnostics with file and line context
  • Stable JSON output for agents and automation
  • Strict modes that can block a CI build
$ contentbit doctor --strict-seoexit 1
CB_SEO_SECTION_MISSING

alternatives/notion.md is missing “Feature comparison”

CB_SEO_LINK_REQUIRED

expected a link to seo-tools-comparison

repair plan

2 required fixes · 1 suggestion

the same gate checks

  • Page-family requirements
  • Block schemas
  • Link targets and backlinks
  • Thin sections and image alt text
local · agent loop · CI
content graph12 links resolved
Internal linking graph for an SEO page familyA comparison hub connects to product alternatives, guides, and glossary pages with resolved outgoing links and backlinks.alternativeNotion alternativesalternativeSemrush alternativesguideChoose an SEO toolglossarySEO content auditcomparison hubBest SEO toolsbacklinksrequired link
stable keys
locale-aware
alias-safe

04·The content graph

Internal links become part of the model

Declare relationships in frontmatter and let Contentbit resolve links, backlinks, aliases, and localized page keys across the whole project.

Plan links before files exist

A planned page can already belong to a hub and carry required destinations.

Keep multilingual clusters coherent

Resolve localized slugs through stable keys without mixing locales.

05·The library

Keep one portable content model

Contentbit processes and validates the document before render. React, Astro, and Markdown adapters decide presentation without changing what writers or agents author.

content/article.md
## Feature comparison :::comparison{left="A" right="B"}- Price | $9 | $12:::

processed once, adapted anywhere

React
<ContentBlocks />
Astro
<ContentBlocks />
Markdown
renderToMarkdown()

Your content model stays portable. Renderers only decide how validated prose and blocks appear on each surface.

06·Structured building blocks

Give agents useful structure without arbitrary components

Comparisons, FAQs, steps, metrics, and other registered blocks stay typed, validated, portable, and editable in your own design system.

authoring example
:::callout{type="tip" title="Worth knowing"}Always weigh flour — volume measures drift by 20%.:::

Use when: Practical advice that prevents a common mistake (tip)

rendered

Highlighted note, tip, warning, important, or TLDR box.

Start with one page family

Make scale a property of the system, not the prompt.

Scaffold the library, project config, SEO contracts, Studio, and agent instructions in one command.

$ pnpm dlx contentbit@latest init --seo