Browse documentation

Start here

OverviewYour first siteBuild and inspect your siteWrite useful documentationGlossaryTroubleshooting

Shape your site

ConfigurationAuthoring recipesSections and identityCustomize the home pageThemesCustom CSS (advanced)Machine-readable contractsVisual fixturesMathematics

Publish safely

Audit your documentationGitHub PagesPre-publish checklistHistorical documentationQualification evidenceMigration

Pascal and project internals

PasWeave integrationArchitectureArchitecture analysisProject specification (historical)

Project decisions

BoundariesHistory and customisationRelease-tag publicationReader-first documentationLocal syntax highlightingExisting-repository adoptionGitHub Pages setupDocumentation auditSimple configurationv1.0 stable contractDocSprout rebrand

Machine-readable contracts

DocSprout produces deterministic generated output for browsers and for tools. This page documents which output is a public contract, and which parts are deliberately not stable.

Schema-version-1 configuration

The following field families are the stable customisation contract for 1.x. Every modern file starts with "schema_version": 1; unknown fields are errors rather than silently ignored. Optional fields may be omitted to keep the defaults.

File/objectStable fields
docsprout.jsonschema_version, project, theme, layout, banner, identity, homepage
projectname, description, repository_url, site_url
themepreset, style, accent, accent_secondary, custom_css
layout in docsprout.jsoncontent_width (compact, comfortable, wide)
bannerpath, alt
identitylogo, footer, links
homepagecapabilities, sections (capabilities, banner, introduction, release_context)
layout.jsonschema_version, home, unlisted, navigation
page/section entriestitle, path, source; section entries contain pages
docs/versions.jsonschema_version, current, versions (release, source_ref)

source: "root" is reserved for the exact repository-root README.md. theme.custom_css and identity.logo must remain repository-local assets. The configuration guide gives the editing examples and the validation diagnostics for each field family.

CLI contract

The stable command names are init, serve, check, audit, build, doctor, github-pages, check-release and build-all. All accept --root; the command-specific options are:

CommandOptions
build--output, --release, --offline-archive
build-all--output
serve--host, --port
audit--strict, `–format text\json`
github-pages--update

Successful commands exit 0. A documentation or release validation error exits 1; audit uses exit 1 for errors (or strict warnings) and exit 0 for non-strict warnings; invalid audit configuration exits 2. --version exits 0 and prints docsprout <version>. Argparse usage errors are the usual exit

  1. Human-readable sentences may improve without being a compatibility change.

Reusable workflow inputs

.github/workflows/publish-docs.yml is a reusable workflow with two stable inputs: boolean versioned (default true) and string release (default preview). Versioned builds require immutable docs/versions.json refs; single-version builds use the release label. Caller workflows must pin a released DocSprout tag, never main.

Generated routes

Routes come from the listed Markdown path and the selected home page:

DocumentRoute
The selected home documentindex.html
docs/index.md when another document is homedocs-index.html
any other listed documentpath/with/suffix.html

Routes are collision-protected before any output is written. Two listed documents whose routes would overwrite each other fail the build with an actionable error. Case-insensitive collisions (Foo.md and foo.md) are rejected too, because published sites are also served from case-insensitive platforms.

Machine-readable files

search-index.json

The browser search reads this file. Versioned shape:

{
  "schema_version": 1,
  "entries": [
    {
      "title": "Configuration",
      "section": "Shape your site",
      "url": "configuration.html",
      "text": "plain text used for ranking and previews"
    }
  ]
}

release.json

Written by every single-release build. Versioned shape:

{
  "schema_version": 1,
  "release": "1.0.0",
  "page_count": 23
}

versions.json (build output, not the manifest)

Written at the root of a historical build by build-all. It mirrors the configured docs/versions.json manifest:

{
  "schema_version": 1,
  "current": "1.0.0",
  "versions": [
    {"release": "1.0.0", "source_ref": "v1.0.0"}
  ]
}

Do not confuse this output with the input manifest docs/versions.json, which has the same versioned shape and is the release-history configuration.

docsprout audit --format json

Deterministic CI-friendly diagnostics. Root fields:

{
  "schema_version": 1,
  "pages": 23,
  "errors": 0,
  "warnings": 0,
  "findings": [
    {
      "code": "DK102",
      "severity": "warning",
      "file": "docs/architecture.md",
      "line": 12,
      "message": "Heading level jumps from H2 to H4",
      "target": "some-heading"
    }
  ]
}

target is present only when a finding names one. Findings are ordered deterministically by page order, then source position.

1.x compatibility policy

Compatible additions are preferred within 1.x. A deprecation keeps the old surface working for at least one minor release and is documented in the changelog and migration guide before removal in the next major release. The pre-rebrand aliases listed below are deprecated in v1.1.0 and are removed in v2.0.0. Schema or machine-format changes require a new schema version and an explicit migration path. A safety fix may reject behavior outside this documented contract, with a regression test and migration guidance when user action is needed.

The compatibility boundary

Stable for 1.x:

The documented --dk-* names are the stable customisation contract. Internal variables that happen to share the prefix are not included.

Not stable (may change without notice):

The Python API boundary

DocSprout is primarily a CLI/application package. docsprout.__version__ is public and may be used for version inspection. Everything else in the docsprout package—modules, classes, functions, data structures—is an implementation detail unless this documentation explicitly marks it public. Do not import internal modules from your own tools; pin the docsprout release and use the CLI and machine formats instead.

External checks

audit never network-checks external URLs; the text report states this explicitly. Machine-readable consumers should apply their own network policy.