Guide

Testing GitBook documentation examples

Point the scan at the synced GitBook root, check every tab and reusable include as a reader would see it, and catch invisible characters before they break copied code.

Published
Updated
November 17, 2026
Reading time
11 min
Facts checked against
GitBook docs on Git Sync content configuration, code blocks, tabs and reusable content, with every code block run on Python 3.13 and Node 24 (November 12, 2026)
Outlined documentation pages with a lime pulse line running out of the stack
On this pageThe short answerUnderstand the synced sourceWalk through a Git Sync exampleWhat the engine seesMake GitBook checks repeatableWhere DocsAlive fitsThe sources we checkedFAQ

The short answer

Test the Markdown that GitBook syncs, with the same root and context a reader sees. In engine 0.6.3, DocsAlive treats GitBook as plain Markdown: fences inside code tags are found, but GitBook tabs are not grouped and includes are not expanded into their pages. Set the scan directory deliberately, check each tab and reusable block, and investigate invisible characters as well as ordinary code failures.

A page can look correct in the GitBook editor and still contain an example that has never run. A sync makes the source available in a repository, which is a useful place to run checks, but it does not automatically recreate the rendered page's assembled context. A reusable block and the page that includes it can be scanned as separate files even though a reader sees one continuous page.

This guide builds a small example around that distinction. It also shows a check for invisible characters, which can make a copied program fail even when the offending character is difficult to see.

Understand the synced source

Git Sync configuration can include gitbook-docs.yaml for a site and .gitbook.yaml for a space. The latter can specify the content root and the locations of the readme and summary. SUMMARY.md describes navigation. When the space maps to the repository root but content lives in docs/, the root configuration can point GitBook there.

GitBook can wrap a fenced code block in a code tag with attributes such as a title, line numbers, or overflow behavior. It also supports tabs and reusable content. Synced reusable content is exported under .gitbook/includes in the root of each synced section, and a page refers to the include with a path relative to that page.

These constructs matter to testing. A scanner that reads fences can find code inside the code tag, but it may not understand the surrounding presentation. It may run every tab independently rather than choose one alternative. It may find an include file without inserting its contents into the page that references it. Test the assembled reader path as well as individual files where the relationship matters.

Examples can break when an editor changes a command without running it, when one tab is updated and another is left behind, or when a reusable block is inserted into pages with different prerequisites. Invisible characters introduced during copying can produce syntax errors. A scan aimed at the wrong root can report clean results for an unrelated folder while the published pages receive no coverage.

Classify blocks by purpose

Block Appropriate treatment
Runnable code or command Run with the documented setup and intended version.
Fragment Identify omitted context and review how a reader completes it.
Credential-gated sample Keep secrets out of general checks and record the untested path.
Illustrative configuration Parse and validate with the relevant tool where possible.
Displayed output Verify with a suitable assertion or review rather than assuming a nearby sample checks it.

For a reusable block, also ask whether it is complete on its own, depends on each including page, or provides a prerequisite that later examples need. Those are different contracts.

Walk through a Git Sync example

This illustrative .gitbook.yaml belongs at the repository root. It tells GitBook that the space's content is under docs/ and names its readme and summary. The file configures GitBook; the scanner does not read it.

root: ./docs/

structure:
  readme: README.md
  summary: SUMMARY.md

The corresponding docs/SUMMARY.md provides navigation. A navigation entry is useful for locating reader-facing pages, but it is not an execution plan.

# Table of contents

* [Introduction](README.md)
* [Getting started](guides/getting-started.md)

The page below includes reusable installation content, offers two sets of tabs, and wraps a JavaScript fence in a titled code tag. The Python and Node.js tabs are alternatives; the pip and pipx tabs are also alternatives. The latter can have different tool prerequisites.

# Getting started

{% include "../.gitbook/includes/install-client.md" %}

{% tabs %}
{% tab title="Python" %}
```python
import json
print(json.dumps({"status": "ok"}))
```
{% endtab %}

{% tab title="Node.js" %}
```javascript
console.log(JSON.stringify({ status: "ok" }));
```
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="pip" %}
```bash
python3 -m pip --version
```
{% endtab %}

{% tab title="pipx" %}
```bash
pipx --version
```
{% endtab %}
{% endtabs %}

{% code title="hello.js" lineNumbers="true" %}
```javascript
console.log("hello");
```
{% endcode %}

GitBook exports the reusable installation block as a separate Markdown file. Its relative location matters to the include in the page above.

```bash
python3 -m pip --version
```

The next command reads the simple root value from this illustrative configuration and passes it to the scan. In the checked example, it selected four pages and planned six blocks. This shell extraction is deliberately simple; do not rely on it as a general YAML parser for more complicated configuration. Without --execute, the scan extracts and plans rather than running the blocks.

root=$(sed -n 's/^root: *//p' .gitbook.yaml)
root=${root#./}
root=${root%/}
echo "GitBook root: ${root:-.}"
docsalive scan . --docs-dir "${root:-.}"

A separate inventory can make GitBook-specific coverage questions visible. This script reports include targets, repeated languages in tab groups, and selected invisible characters inside fences. It is a practical check for the illustrated source form, not a complete GitBook parser.

"""Report GitBook syntax that changes what a Markdown code scanner tests."""
import pathlib
import re
import sys

TAG = re.compile(r"\{%\s*(tabs|endtabs|tab|include)\b([^%]*)%\}")
FENCE = re.compile(r"^\s*(`{3,}|~{3,})\s*([\w+-]*)")
INVISIBLE = {"\u200b": "ZERO WIDTH SPACE", "\u200c": "ZERO WIDTH NON-JOINER",
             "\u200d": "ZERO WIDTH JOINER", "\ufeff": "BYTE ORDER MARK", "\u00a0": "NO-BREAK SPACE"}

root = pathlib.Path(sys.argv[1] if len(sys.argv) > 1 else "docs")
problems = 0
for page in sorted(root.rglob("*.md")):
    in_fence, langs_in_group, in_group = False, [], False
    for n, line in enumerate(page.read_text(encoding="utf-8").splitlines(), 1):
        f = FENCE.match(line)
        if f:
            if not in_fence and in_group:
                langs_in_group.append(f.group(2).lower())
            in_fence = not in_fence
            continue
        if in_fence:
            for ch, name in INVISIBLE.items():
                if ch in line:
                    problems += 1
                    print(f"{page}:{n}: {name} (U+{ord(ch):04X}) inside a code block")
            continue
        for m in TAG.finditer(line):
            name, args = m.group(1), m.group(2).strip()
            if name == "tabs":
                in_group, langs_in_group = True, []
            elif name == "endtabs":
                dupes = sorted({l for l in langs_in_group if langs_in_group.count(l) > 1})
                if dupes:
                    print(f"{page}:{n}: tab group repeats {', '.join(dupes)}; each tab is tested separately")
                in_group = False
            elif name == "include":
                target = (page.parent / args.strip("\"' ")).resolve()
                state = "found" if target.exists() else "MISSING"
                if not target.exists():
                    problems += 1
                print(f"{page}:{n}: include {args} ({state}); its code is tested as its own page")
print(f"{problems} problem(s)")
sys.exit(1 if problems else 0)

Run the check from the repository root against the intended content directory.

python3 scripts/gitbook_check.py docs

For the example, the target exists and the repeated shell language is reported for review. Neither is counted as a problem by this script.

docs/guides/getting-started.md:3: include "../.gitbook/includes/install-client.md" (found); its code is tested as its own page
docs/guides/getting-started.md:32: tab group repeats bash; each tab is tested separately
0 problem(s)

The following command deliberately creates a broken JavaScript example with a zero-width non-joiner before the first statement, then runs the inventory again. Use a disposable test file when trying this.

printf '```javascript\n\xe2\x80\x8cconsole.log("hello");\n```\n' > docs/guides/hidden.md
python3 scripts/gitbook_check.py docs

The output locates the invisible character and exits with status 1.

docs/guides/getting-started.md:3: include "../.gitbook/includes/install-client.md" (found); its code is tested as its own page
docs/guides/getting-started.md:32: tab group repeats bash; each tab is tested separately
docs/guides/hidden.md:2: ZERO WIDTH NON-JOINER (U+200C) inside a code block
1 problem(s)

The same character matters to the JavaScript runtime. This command creates a separate file and asks Node to check it.

printf '\xe2\x80\x8cconsole.log("hello");\n' > hidden.mjs
node --check hidden.mjs

Node 24 rejected the line; the final diagnostic was:

SyntaxError: Invalid or unexpected token

This illustrative GitHub Actions YAML runs the inventory when the documentation or its root configuration changes. It does not execute all the documentation examples; add the execution and assembled-page checks that your project needs.

name: gitbook-examples
on:
  pull_request:
    paths:
      - "docs/**"
      - ".gitbook.yaml"
jobs:
  check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - uses: actions/setup-python@v7
        with:
          python-version: "3.13"
      - name: Check GitBook tabs, includes and hidden characters
        run: python3 scripts/gitbook_check.py docs

What the engine sees

Engine 0.6.3 does not detect GitBook as a framework and does not read gitbook-docs.yaml or .gitbook.yaml. It scans GitBook source as plain Markdown. It reads .md, .mdx, and .markdown pages. Without --docs-dir, a top-level docs/ wins if present; otherwise the repository is scanned. With --docs-dir X, the engine chooses X/docs if present and otherwise X. Use the actual GitBook root and inspect the selected pages, especially when the repository has several content trees.

The scanner skips directories named node_modules, .git, dist, build, .next, site, __pycache__, vendor, _snippets, snippets, changelog, blog, i18n, and versioned_docs at any depth. Its include filter matches paths relative to the repository root. A GitBook navigation file is not a substitute for checking scan scope.

Block form → what the engine does in 0.6.3 Practical consequence
Fence inside a GitBook code tag Extracts the fence normally; the surrounding title and display attributes do not make it a separate execution contract.
GitBook tabs with fenced variants Does not group the tabs; every fenced variant is planned separately.
Reusable include Does not expand it into the referencing page. The include file can be scanned on its own if it is in scope.
Page using a name defined only in an include Can fail as depends-on-context, because the page's container does not receive the included definition.
JavaScript beginning with U+200C Fails as invalid-syntax; this is a docs-bug category.
Unmapped fence label Reports a pass without running or parsing it. This is a known limitation.
Python pycon or python-repl session Executes the session and compares its printed output. This is the engine's only printed-output comparison.
A block identified as output Skips it; its contents are not validated.

Console lines after a prompt are run; other lines in the console block are treated as output and not compared. If a result is essential to the lesson, check it with an appropriate assertion in your own workflow.

GitBook's own code-block documentation Markdown had a U+200C at the start of its JavaScript example when read on November 12, 2026. That observation is a useful reminder that invisible characters can appear in real source; it is not a claim about the page's current contents.

Review tabs and reusable content as contracts

For each tab, record the runtime and tools it assumes. A pipx variant that fails because pipx is absent may reveal a missing prerequisite rather than a broken command. Conversely, a variant that only works after another tab runs does not provide the independent path its presentation may imply.

For reusable content, test both the block and the pages that consume it. A block can pass independently but be inappropriate in a page with different setup. A page can fail in a file-based scan because its reader-visible definition lives in an include. Review the assembled page and reproduce the intended sequence before changing code to satisfy a scanner.

Finding Triage question and next step
Invalid syntax Is the complete published sample invalid, including an invisible character? Correct and rerun it.
Missing tool Does the selected tab document how to obtain the tool? Check the runner and the reader's prerequisites.
Depends on context Is the missing name supplied by an include or earlier reader step? Verify the assembled path.
Needs credentials Record the uncovered operation and use a separate authorized test if needed.
Runtime error or timeout Inspect the evidence and environment before attributing it to the documentation.
Unchecked label or skipped output Add a suitable checker; do not interpret a green status as proof.

See findings for categories and the CLI reference for selection and reporting options.

Make GitBook checks repeatable

Run checks on changes to source, shared content, configuration, and the versions that examples use. Scheduled checks can reveal dependency drift between edits. A release check should identify whether it tests a checkout, a built artifact, or the version readers can install.

Keep a small inventory of reusable content and its consumers. When a shared block changes, review the pages that include it, not just the block's own result. If a page depends on setup from the include, use a separate assembled-page test or a fixture that explicitly reproduces that setup. Record the fixture so it does not conceal an undocumented prerequisite.

  • Confirm the GitBook space root and the scanner's selected directory.
  • Check navigation and the actual set of published pages against scan scope.
  • Review skipped folders and files outside the supported page types.
  • Run each tab variant with its own documented prerequisites.
  • Find reusable includes and test both shared blocks and consuming pages.
  • Check for invisible characters in executable fences.
  • Classify fragments, credentials, configuration, and displayed output.
  • Review unchecked labels and every skip reason.
  • Record runtime, package version, fixtures, and setup used in CI.
  • Recheck affected pages when shared content or dependencies change.

Where DocsAlive fits

DocsAlive can scan a checkout or Git URL, plan extracted blocks, and execute supported examples in isolated page containers when requested. It keeps supported blocks in page order and reports findings with their locations and categories. Its separation by page is useful for finding accidental reliance on another file, but it also means that a GitBook include is not automatically part of the consuming page's runtime.

Use the report as a starting point for review. The code-tag fence can be checked directly; GitBook tabs need attention as separate variants; include relationships need a complementary assembled-page check. A site preview remains valuable for navigation, captions, and the way shared content reads in context. The framework reference and docs testing overview describe the broader workflow.

For another source format with theme-specific code forms, see testing Hugo documentation examples. For database examples, see testing SQL examples.

The sources we checked

These sources were read on November 12, 2026. Engine behavior was checked against engine 0.6.3 on the same day.

Source What it covers
Git Sync content configuration Space root, structure, and synced content configuration.
GitBook code blocks Code-block presentation and Markdown representation.
GitBook tabs Alternative content in tabs.
GitBook reusable content Shared content and its use across pages.
Framework coverage Engine support and limits.
Findings Report categories and review.

FAQ

Does the scanner read the GitBook root configuration?

No. Engine 0.6.3 does not read the GitBook configuration files. Set the scan directory to the intended content and verify the selected pages.

Are fences inside GitBook code tags found?

Yes. The fence is extracted normally. Check the rendered page separately for the title, line numbers, overflow, and other presentation choices.

Does the engine choose one GitBook tab?

No. GitBook tab syntax is not grouped by this engine version, so each fenced variant is planned separately. Review the prerequisites and independence of each variant.

Are reusable includes expanded into a page?

No. An include file can be scanned as its own page, but its contents are not inserted into the page that references it. Test the assembled reader path separately.

Why can an apparently ordinary JavaScript line fail?

An invisible character can be part of the source even when it is hard to see. A leading U+200C was checked and reported as invalid syntax; inspect the character and the copied source.

Does a passing result cover every GitBook example?

No. Check the chosen root, included files, tab forms, skips, and labels. An unmapped label can be reported as passing without a check in engine 0.6.3.

Keep reading
Outlined documentation pages with a lime pulse line running out of the stackGuide

Docs Testing: How to Test the Code Samples in Your Docs

Why code examples in documentation break, the ways teams test them (doctest, docs-as-tests, CI runners) and how to run every sample on each release.

Two lenses held over the same documentation page, each bringing a different layer into focusComparison

Vale vs markdownlint: What Each Docs Linter Catches

Vale checks prose style; markdownlint checks Markdown structure. What each catches, sample configs, running both in CI and what neither one tests.

Blueprint of two documentation pages: one with a handwritten test script, one whose code blocks are framed and checkedComparison

Doc Detective vs DocsAlive: Testing the Code in Your Docs

Doc Detective is a free, open-source docs-as-tests framework; DocsAlive is a hosted docs CI for code examples. Features, price, setup and when to use each.

A machine blueprint above a ruled documentation page, with a caliper measuring between themComparison

Promptless Alternative: Promptless vs DocsAlive Compared

Promptless drafts docs updates from what you ship; DocsAlive runs the code examples you've published. Features, pricing, security and when to use each.

A long workbench of outlined testing instruments, each with a small lime light, beside a stack of documentation pagesGuide

Best Free Tools to Test Code Examples in Documentation

Free, open-source tools that run the code examples in your docs: rustdoc, Go examples, doctest, pytest plugins, Sphinx doctest, Doc Detective and byexample.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing SDK Docs Before Every Release: A Release-Gate Guide

Test SDK and client-library docs against the package you ship: build the wheel or npm tarball, install it clean, run every example, and gate the release in CI.

Outlined documentation pages with a lime pulse line running out of the stackGuide

How to Test Quickstarts and Tutorials in Your Docs

Test the onboarding path a new reader follows: run quickstarts in a clean environment, in page order, sort real bugs from credentials and fragments, and wire it into CI.

Outlined documentation pages with a lime pulse line running out of the stackGuide

How to Test CLI Documentation: Commands, Flags and Output

Test the commands a CLI page promises: install in a clean container, run examples in order, compare flags with --help, check exit codes and output, and run it in CI.

Outlined documentation pages with a lime pulse line running out of the stackGuide

How to Test API Reference Docs: Requests, Responses and SDKs

Test API reference pages against the contract they publish: methods, parameters, request and response examples, SDK snippets, status codes and OpenAPI samples.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Docs testing for API-first companies

Keep API quickstarts, SDK snippets and curl examples working across releases.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Docs testing for CLI and developer-tool vendors

Test developer-tool install paths, package managers and command examples across releases.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing README Code Examples: Install, Usage and CI

Keep README install commands and usage examples working with clean environments, output checks and CI.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Notebooks and Executable Docs: Cells, Kernels and Output

Test notebooks in fresh kernels, check meaningful output and manage dependencies, data and drift in CI.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Docs in GitHub Actions: Pull Requests and Scheduled Checks

Run documentation example checks in GitHub Actions with practical guidance on schedules, path filters, caching, secrets and reports.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Code Examples in MkDocs, Docusaurus and Sphinx Sites

Find and test documentation examples in Markdown, MDX and reStructuredText, alongside site builds and link checks.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Python Docs Testing: Doctest, Pytest and Markdown

Test Python documentation with doctest, pytest, Markdown example execution and isolated environments.

Outlined documentation pages with a lime pulse line running out of the stackGuide

JavaScript Docs Testing: Node, TypeScript and Modules

Test Node and TypeScript documentation examples across module formats, package versions and type checks.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Go documentation examples

Test Go example functions and Markdown snippets against the intended module versions in clean environments.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Sphinx Docs Testing: doctest, code-block and MyST

Test Sphinx documentation examples: what the doctest and linkcheck builders prove, code-block and literalinclude, MyST fences, and what a Markdown scan covers.

Outlined documentation pages with a lime pulse line running out of the stackGuide

ReadMe Docs Testing: CLI, OpenAPI and Code Examples

Test ReadMe documentation examples: docs-as-code and bi-directional sync, what lint and oas:validate prove, Tabs variants and runnable code.

Outlined documentation pages with a lime pulse line running out of the stackGuide

TypeScript Docs Testing: tsc --noEmit and Runtime

Test TypeScript documentation examples: type-check snippets with tsc --noEmit in a consumer project, then run them, and what each check proves.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Docusaurus Docs Testing: Code Blocks, Tabs and MDX

Test Docusaurus documentation examples: builds vs runnable code, code block metadata, Tabs install variants, MDX pages and clean-container runs.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Mintlify Docs Testing: CodeGroup, Tabs and the CLI

Test Mintlify documentation examples: docs.json, MDX pages, CodeGroup and Tabs variants, what mint broken-links and mint validate prove, and clean runs.

Outlined documentation pages with a lime pulse line running out of the stackGuide

MkDocs Docs Testing: Code Examples, Tabs and Snippets

Test MkDocs documentation examples: strict builds, Material tabs, Snippets includes, mkdocstrings pages and clean-container runs.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Installation Instructions: pip, npm and Containers

Test documented install steps in clean environments: pip and extras, venv, npm install vs npm ci, containers and the first import.

Outlined documentation pages with a lime pulse line running out of the stackGuide

AI SDK Docs Testing: LLM Examples, Keys and Drift

Test AI and LLM SDK documentation examples: requests, responses, streaming, tool calls, credentials, model retirements and CI.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing migration guides and changelog examples

Test before and after examples against the right releases and make migration documentation part of the release gate.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Docs Testing Checklist: Code Examples Before Release

A practical pre-release checklist for testing documentation examples, reviewing gaps and verifying published packages.

Outlined documentation pages with a lime pulse line running out of the stackGuide

The Cost of Broken Code Examples in Documentation

Understand how broken documentation examples create friction in developer adoption and support, and how to reduce it.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Rust documentation examples

Test Rust rustdoc examples and cargo documentation tests, and keep native Rust checks because compiled Rust fences are recognized but not executed.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing VitePress documentation examples

Test VitePress Markdown examples separately from the site build, including code groups, includes and what a plain Markdown scan covers.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing docs in GitLab CI

Run documentation example checks in GitLab CI jobs, keep site builds separate from execution, and review what a scan covers and skips.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing JSON, TOML and YAML examples in docs

Test JSON, TOML and YAML config examples in documentation: parse, schema and tool checks, honest fence labels, fragments, CI jobs and what a scan covers.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Java documentation examples

Test Java examples in READMEs, SDK docs and Javadoc: the source launcher, javac, JShell scripts, assertions, @snippet files, CI and what a scan covers.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing PHP documentation examples

Test PHP examples in docs: php -l lint, clean-directory runs, assertions with zend.assertions, Composer scratch projects, PHPUnit, CI and scan coverage.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing C# documentation examples

Test C# examples in docs: .NET 10 file-based apps, dotnet build with warnings as errors, test projects, XML doc comments, CI and scan coverage.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Ruby documentation examples

Test Ruby examples in docs: ruby -c syntax checks, clean-directory runs, bundler/inline, minitest assertions, YARD examples, CI and scan coverage.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Kotlin documentation examples

Test Kotlin examples in docs: kotlinc runnable JARs and scripts, -Werror, KDoc @sample in compiled source, kotlinx-knit, fence labels, CI and scan coverage.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Swift documentation examples

Test Swift examples in docs: swift scripts, swiftc -typecheck, DocC snippets compiled by swift build, Swift Testing assertions, CI containers and scan coverage.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing curl and HTTP examples in API docs

Test curl examples in API docs: --fail-with-body, status and JSON checks against a local stub, http fences, credentials and what a docs scan checks.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Astro Starlight documentation examples

Test code examples in Astro Starlight docs: src/content/docs inventory, Tabs and Expressive Code, Markdoc pages, a Node check script, CI and scan coverage.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Nextra documentation examples

Test code examples in Nextra docs: content/ and app/ sources, fence metadata, Tabs and npm2yarn, a Node check script, CI and an honest scan limitation.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Docs testing for open-source projects

Test the code examples in open-source docs and READMEs: pull requests from forks, release and scheduled checks, contributor guidelines, triage and the Open source plan.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Docs testing for technical writers and docs teams

How technical writers and docs teams test the code examples they publish: docs-as-code checks, style-guide rules, reading a report, routing findings to engineers.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Docs testing for DevRel teams

How developer advocates test quickstarts, tutorials, workshops and sample READMEs: an inventory, a launch and release cadence, reading a report, and honest reporting.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Hugo documentation examples

Test the code examples in Hugo docs: fences with brace options, the highlight shortcode, Docsy tabs, drafts and theme example sites, scan scope and CI.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing SQL examples in documentation

Test SQL examples in docs: run fences in page order on a fresh database, assert results, handle dialects, SQLite STRICT typing, psql ON_ERROR_STOP and CI.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing mdBook documentation examples

Test the code in an mdBook: what mdbook test covers, rust attributes, hidden lines, include directives, untagged output fences and a scan-ready copy for CI.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Docsify documentation examples

Test the code examples in Docsify docs: embedded code files and fragments, docsify-tabs tab sets, Prism grammars, scan scope and a CI check.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Jekyll documentation examples

Test the code examples in Jekyll docs: include tags, site variables, highlight tags, posts and _site copies, a scan-ready copy and Ruby hooks.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Antora and AsciiDoc documentation examples

Test the code examples in Antora docs: example includes, tagged regions, attributes, failing the build on missing includes and a Markdown copy to scan.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Fumadocs documentation examples

Test the code examples in Fumadocs docs: npm fences and package-manager tabs, tab groups, the Tabs component, includes, pycon highlighting and a scan-ready copy.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing versioned Docusaurus docs

Test every Docusaurus version readers can reach: versioned_docs copies, versions.json, partials, tabs, per-version scans and old-version triage.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Read the Docs documentation examples

Test the code examples on a Read the Docs site: .readthedocs.yaml build jobs, a pycon gate, latest and stable versions, Sphinx, MyST and .rst coverage.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Eleventy documentation examples

Test the code examples in Eleventy docs: Liquid pre-processing, global data, include tags, ignored drafts, raw tags and a rendered copy to scan.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Zola documentation examples

Test the code examples in Zola docs: Tera content templating, raw tags, config values, hide_lines, drafts, blog posts and a scan-ready copy.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Quarto documentation examples

Test the code examples in Quarto docs: executable cells, display-only fences, freeze and _freeze, a CI profile, cell options and a copy to scan.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Hexo documentation examples

Test the code examples in Hexo docs: posts, drafts, scaffolds, codeblock and include_code tags, a build check and a scan-ready copy.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing pdoc documentation examples

Test the code examples in pdoc docs: doctest for >>> sessions, fenced docstring examples, the README, private items and a copy to scan.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Doxygen documentation examples

Test the code examples in Doxygen docs: compiled example files, snippets, Markdown pages, WARN_AS_ERROR and what a scan can and cannot check.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing TypeDoc documentation examples

Test the code examples in TypeDoc docs: example tags, includeCode regions, project documents, a compiler check of extracted examples and a scan.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing JSDoc documentation examples

Test the code examples in JSDoc docs: example tags, captions, source patterns, tutorials, a doclet export and a scan-ready copy with assertions.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing docs examples with pre-commit hooks

Check docs code examples with pre-commit: local hooks, files filters, always_run, pass_filenames, SKIP and --no-verify, and what to leave for CI.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing documentation examples with Deno

Run docs code examples with deno test --doc: JSDoc and Markdown examples, imports, hashbang permissions, ignored blocks and deno check --doc-only.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing documentation examples with Sybil

Test Python docs examples with Sybil and pytest: Markdown parsers, invisible setup, skips, clear-namespace, docstrings and pycon fences a scan can read.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Markdoc documentation examples

Test the code examples in Markdoc docs: variables in fences, partials, if/else, custom tabs, validate in CI and a scan-ready copy from transform.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Markdown examples with phmdoctest

Test Python examples in README and Markdown files with phmdoctest: sessions, output blocks, directives, --report, generated pytest files and pycon fences.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Markdown code blocks with pytest-markdown-docs

Run Markdown python fences as pytest tests with pytest-markdown-docs: globals hook, fixtures, continuation, notest, retry and pinning the released version.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing command line docs with prysk and Cram

Test CLI docs with prysk and Cram: .t transcripts, exit statuses, (re) and (glob) matches, and generating tests from the console blocks in your Markdown.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Python docstring examples with xdoctest

Run docstring examples with xdoctest: the pytest plugin, google and freeform parsing, permissive output matching, directives, and what it does not check.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing multi-language docs examples with byexample

Test docs examples with byexample: prompt-based language detection, the -l selection, +pass, +skip and timeouts, capture tags, and hidden setup in comments.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Markdown code blocks with mktestdocs

Run Markdown code blocks under pytest with mktestdocs: exact fence labels, memory=True for shared state, bash blocks, custom executors and docstring checks.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing README code blocks with pytest-codeblocks

Run README and Markdown code blocks with pytest-codeblocks: exact python, sh and bash labels, cont, skip and xfail markers, expected output, and gaps.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Markdown code examples in any language with txm

Test annotated Markdown examples with txm: program, in, out, err, check and exit annotations, TAP output, exact matching, and blocks it never runs.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing Sphinx docs examples with sphinx.ext.doctest

Run Sphinx doctest, testcode and testoutput directives in reStructuredText or MyST pages: groups, hidden setup, global setup and what is never run.

Outlined documentation pages with a lime pulse line running out of the stackGuide

Testing docs examples that need API keys

Test credential-gated docs examples: honest placeholders, offline stubs and fixtures, live sandbox jobs, CI secrets and fork rules, and how a scan classifies them.

A machine blueprint above a ruled documentation page, with a caliper measuring between themGuide

Documentation Drift: How to Detect It Before Users Do

What documentation drift is, why code examples drift first, and practical ways to detect it: ownership, release checks, link and execution tests.

See which of your code samples still run.

Send us a public repository. Our team runs DocsAlive on its docs and emails you the real report within 2 business days. Free, no signup.