Guide

Testing Antora and AsciiDoc documentation examples

Run the files in the examples folder, test the regions each page assembles, and fail the build when an include goes missing.

Published
Updated
November 17, 2026
Reading time
13 min
Facts checked against
Antora docs on standard directories, example includes, the quickstart and CLI options, Asciidoctor docs on source blocks and tagged regions and the downdoc README, with every code block run on Antora 3.2.2 and Python 3 (November 13, 2026)
Outlined documentation pages with a lime pulse line running out of the stack
On this pageThe short answerHow Antora holds examplesWhy Antora examples driftClassify what the reader seesWhat a raw scan coversConvert the relevant source blocksTriage findingsTest the examples folder as real codeWhere DocsAlive fitsThe sources we checkedFAQ

The short answer

Build the Antora site, test example files directly, and prepare a reviewed Markdown copy if you want DocsAlive to run page examples. Engine 0.6.3 scans Markdown and MDX files, not AsciiDoc pages. An Antora site therefore gets no coverage of its .adoc pages in a raw scan. The verified copy script below handles a useful subset, but it does not implement all Antora or AsciiDoc behavior.

An Antora page can show only selected lines from a file stored elsewhere. That keeps the source and documentation close, but a selected region can omit an import or setup that made the full file work. A successful site build also does not establish that a reader can run the displayed fragment. Test both the real file and the code assembled for the page.

The same distinction applies to renamed files and substituted attributes. A page can still build with an error in its log unless the build is configured to fail at the appropriate severity. For related workflows, see static-site docs testing, Jekyll and Fumadocs.

How Antora holds examples

An Antora playbook identifies content sources and the site UI. Each content source has an antora.yml component descriptor. In this layout, pages live under modules/ROOT/pages, runnable source files under modules/ROOT/examples, and navigation in nav.adoc. A page can include an example by resource ID and select tagged regions. Source blocks use a language declaration followed by delimiter lines; attributes are substituted inside a block when its substitution settings request that behavior.

The illustrative build below commits the content first because the verified local Antora build reads the local Git content source.

git init -q && git add -A && git commit -qm "docs"
npm init -y >/dev/null && npm i -D -E antora@3.2.2
npx antora antora-playbook.yml

This illustrative playbook points to the local content source with docs as its start path.

site:
  title: Example Docs
  start_page: example::index.adoc
content:
  sources:
  - url: .
    start_path: docs
    branches: HEAD
ui:
  bundle:
    url: https://gitlab.com/antora/antora-ui-default/-/jobs/artifacts/HEAD/raw/build/ui-bundle.zip?job=bundle-stable
    snapshot: true

The illustrative component descriptor provides navigation and a minimum Python value. A changed attribute can alter the command the reader sees without changing the page itself.

name: example
version: ~
title: Example
nav:
- modules/ROOT/nav.adoc
asciidoc:
  attributes:
    min-python: '3.10'

The illustrative navigation file identifies the page in the site navigation.

* xref:index.adoc[Getting started]

The illustrative example file contains separately tagged import and demo regions. It also runs as a complete file, which provides an independent check of its source.

# tag::imports[]
import json
# end::imports[]

# tag::demo[]
settings = {"retries": 3, "timeout": 10}
print(json.dumps(settings, sort_keys=True))
# end::demo[]

The illustrative page selects both regions, substitutes the configured attribute in its shell block, and includes a Python interpreter session. Antora rendered the selected import and demo lines together in the verified build.

= Getting started

Check that Python is at least {min-python}.

[source,bash,subs="attributes+"]
----
python3 -c "import sys; assert sys.version_info >= tuple(map(int, '{min-python}'.split('.')))"
----

The settings example is included from the examples folder.

[source,python]
----
include::example$client.py[tags=imports;demo]
----

A quick check in the interpreter:

[source,pycon]
----
>>> 2 + 3
5
----

The Antora directory reference and example include documentation describe these locations and resource IDs. The AsciiDoc source-block and tagged-region references explain the page-level constructs.

Why Antora examples drift

Antora encourages a healthy habit: keep runnable code in real files and show it on pages through includes. That habit removes copy-and-paste drift, but it creates a different kind of drift that is easy to miss in review.

Tagged regions hide the setup. A page that includes only the demo region shows the lines the author wanted to discuss. The import, the client construction or the configuration that made those lines work may sit in another region that the page does not include. When someone adds a new dependency to the full file, the file keeps working and the page silently loses a step. A reader who copies the displayed lines gets an undefined name.

Renamed example files break pages far from the diff. Moving client.py to a new folder is a one-line change in a pull request about code. Every page that includes it by resource ID now points at nothing. With the default log failure level the build still finishes. In our test, the published page then showed the text "Unresolved include directive in modules/ROOT/pages/index.adoc" followed by the include line, where the code should have been.

Attributes change commands everywhere at once. A minimum version or package name stored in antora.yml is substituted into every block that asks for attribute substitution. One edit to the descriptor changes the command on every such page, which is useful until the value is wrong. Blocks that do not request attribute substitution show the raw reference instead, which is a different kind of mistake that only appears on the rendered page.

Examples that live outside the page are run by nobody. Because the examples folder is not a test suite by default, files there can be stale for a long time. They look like source code, so readers trust them, but no CI job imports or runs them unless someone sets that up.

Versioned components multiply all of this. A playbook can list several branches of a content source, for example one per release, and Antora publishes each as a version of the component. A fix made on the main branch does not repair the same example in an older published version, and an example that was correct for an older release can be broken by a dependency that has since changed.

Each of these is a reason to test two things: the real example files, and the code that each page actually assembles from them.

Classify what the reader sees

Kind Appropriate check
Complete source block Run it with the page’s prerequisites and in its documented sequence.
Included regions Test the selected combination as displayed, including imports and setup.
Example file Run or test the real file independently of the page.
Attribute-dependent command Verify the value and substitution settings used for the build.
Configuration Parse it and validate behavior with the relevant tool.
Output or intentional fragment Review its meaning and state clearly what is omitted.

A real-file test and a page-level test answer different questions. The complete example may pass because it contains an import outside the selected region. The page can fail because the selection omits that import. Conversely, a displayed snippet can work in isolation while another part of the maintained example file has become broken.

What a raw scan covers

The following command plans the illustrative raw repository scan. It does not execute examples without the execution flag.

docsalive scan .

In the verified repository, DocsAlive detected a plain Markdown layout and found one page, the root README, with no blocks. It did not scan any .adoc page. This is a coverage limit, not a clean result for the Antora site.

Antora/AsciiDoc construct What Antora renders What the engine does in 0.6.3
.adoc page A site page Does not scan it.
Source block Highlighted source in the page Cannot extract it from the raw AsciiDoc page.
Example resource include Content from the examples folder Does not resolve it in the raw page.
Tagged regions Selected lines Does not assemble or test the selection in the raw page.
Attribute substitution A value inserted according to the block’s substitutions Does not evaluate it in the raw page.
Markdown copy Not the Antora page itself Scans eligible fenced blocks, subject to language and runner limits.

A label unknown to the engine can be reported as passing without being run or parsed. This is an engine limitation in 0.6.3. Check the language and the actual coverage rather than interpreting every green result as execution.

Convert the relevant source blocks

The following illustrative preparation script was verified for the layout above. It needs a YAML parser in its environment. It converts supported source blocks, resolves example includes and selected tags, and fills component attributes only where the block requests attribute substitution.

"""Write a scan-ready Markdown copy of Antora source blocks.

For every page in docs/modules/*/pages, each [source,LANG] or [,LANG]
block delimited by ---- becomes a fenced Markdown block. Lines such as
include::example$FILE[] and include::example$FILE[tags=a;b] are replaced
with the file (or its tagged regions) from the module's examples folder. Attribute references are
filled in from antora.yml only when the block sets subs with attributes.
"""
import re
import sys
from pathlib import Path

import yaml

root = Path(sys.argv[1] if len(sys.argv) > 1 else "docs")
out = Path(sys.argv[2] if len(sys.argv) > 2 else "scan-docs")
attrs = (yaml.safe_load((root / "antora.yml").read_text()).get("asciidoc") or {}).get("attributes") or {}
SOURCE = re.compile(r"^\[(?:source)?,\s*([\w+-]+)([^\]]*)\]\s*$")
INCLUDE = re.compile(r"^include::example\$([^\[]+)\[(.*)\]\s*$")
problems = 0


def region(path, tags):
    lines = path.read_text().splitlines()
    if not tags:
        return lines
    keep, active = [], set()
    for line in lines:
        m = re.search(r"(tag|end)::([\w-]+)\[\]", line)
        if m:
            (active.add if m.group(1) == "tag" else active.discard)(m.group(2))
            continue
        if active & set(tags):
            keep.append(line)
    return keep


for page in sorted(root.glob("modules/*/pages/**/*.adoc")):
    module = page.relative_to(root).parts[1]
    lines = page.read_text().splitlines()
    md = [f"<!-- generated from {page} -->"]
    i = 0
    while i < len(lines):
        m = SOURCE.match(lines[i])
        if m and i + 1 < len(lines) and lines[i + 1].strip() == "----":
            lang, opts = m.group(1), m.group(2)
            body, j = [], i + 2
            while j < len(lines) and lines[j].strip() != "----":
                inc = INCLUDE.match(lines[j])
                if inc:
                    target = root / "modules" / module / "examples" / inc.group(1)
                    tags = re.findall(r"tags?=([\w;-]+)", inc.group(2))
                    tags = tags[0].split(";") if tags else []
                    if target.exists():
                        body += region(target, tags)
                    else:
                        print(f"{page}:{j + 1}: missing example {target}")
                        problems += 1
                else:
                    body.append(lines[j])
                j += 1
            text = "\n".join(body)
            if "attributes" in opts:
                text = re.sub(r"\{([\w-]+)\}", lambda a: str(attrs.get(a.group(1), a.group(0))), text)
            md += ["", f"```{lang}", text, "```"]
            i = j + 1
            continue
        if lines[i].startswith("= "):
            md += ["", "# " + lines[i][2:]]
        i += 1
    dest = out / module / page.relative_to(root / "modules" / module / "pages").with_suffix(".md")
    dest.parent.mkdir(parents=True, exist_ok=True)
    dest.write_text("\n".join(md) + "\n")
    print(f"wrote {dest}")

sys.exit(1 if problems else 0)

Create the copy and plan its scan as follows:

python3 scripts/adoc_scan_copy.py docs scan-docs
docsalive scan . --docs-dir scan-docs

The verified script run produced this file list:

wrote scan-docs/ROOT/index.md

The resulting scan covered two pages, including the root README, and three blocks. When executed, the shell version check, Python block and interpreter session passed. The engine compares printed output only in Python pycon or python-repl sessions. Findings point to the generated copy, so map them back to the original page and example file.

The next illustrative block is broken on purpose: it selects the demo region without the import. The copied Python block failed as depending on context because the required name was not defined; the rendered page also displays the incomplete selection.

[source,python]
----
include::example$client.py[tag=demo]
----

This illustrative diagnostic is also broken on purpose: the include names a file that does not exist. The preparation script reported the missing example and exited with a failure status.

docs/modules/ROOT/pages/index.adoc:14: missing example docs/modules/ROOT/examples/clients.py

In the verified build, Antora logged the missing include as an error but still exited successfully under the initial command. The following command makes that error fail the build:

npx antora --log-failure-level=error antora-playbook.yml

The Antora CLI options document the failure-level setting. Make the build gate explicit in your own CI, and review its logs as well as its exit status.

Know the conversion limits

The script is a focused aid, not a general Antora renderer. It does not handle partials, cross-module or cross-component resource IDs, conditionals, callout markers, or literal and listing blocks without a source language. Check those examples separately and compare representative copied blocks with the rendered site.

downdoc alone is not enough for this workflow: its documentation says it drops include directives. It suggests an Asciidoctor preprocessing step, but that step does not resolve Antora resource IDs. A conversion that silently loses an include cannot establish that the reader’s assembled example was tested.

Run the files in the examples folder using their own language’s test tools. Include dependencies, fixtures and supported versions in that test. Then test the selected page fragments separately, because a complete file’s setup may not appear in the selected regions.

Triage findings

Finding What to check next
Missing include Correct the resource ID or restore the file; make the build fail on the logged error.
Undefined name in a selected region Check whether an import or setup region was omitted from the page.
Attribute-dependent command fails Compare the configured value and block substitutions with the rendered command.
Full file passes but page fails Test the selected lines together, in the order shown.
Copy lacks a block Determine whether it uses a construct the script does not support.
Credential or fixture needed Record the gap and use an appropriate authorized test separately.

Keep test setup visible. If the test installs a dependency that the page never mentions, decide whether that dependency is a documented prerequisite or an omission. A successful run with extra setup is useful evidence, but it does not by itself prove that a new reader can follow the page.

Use this checklist during review:

[ ] Build the Antora site with an appropriate log failure level.
[ ] Check changed example files and resource IDs.
[ ] Run examples as real files with their intended dependencies.
[ ] Review tagged selections for imports, setup and ordering.
[ ] Verify attribute values and substitution settings.
[ ] Create a fresh scan-ready Markdown copy and inspect its coverage.
[ ] Execute supported copied blocks and trace findings to source.
[ ] Test unsupported constructs and skipped examples separately.

Test the examples folder as real code

The examples folder is the easiest part of an Antora site to test well, because the files are already real source files. Treat it like a small project.

Give the folder the same dependency file and version pins a reader would use, and run each example as a program or import it from a test. The verified example in this guide runs as a complete file and prints its result, which is the simplest possible check. Larger examples usually benefit from a test file that imports them and asserts on a result, so that a change in behavior fails loudly instead of printing something slightly different.

Keep tagged regions meaningful. If a page shows only the demo region, put everything a reader needs for that region in it, or include the setup region on the page as well. A useful review rule is that every region a page includes should run when its regions are concatenated in the order shown. The scan-ready copy checks exactly that combination for the pages it supports.

Make the Antora build part of the same job. Set the log failure level so that a missing include stops the build, and run the build on pull requests that touch either pages or examples. A rename that breaks an include then fails in the pull request that caused it, not weeks later on the published site.

For versioned components, run the checks on each branch that still publishes, not only on the default branch. An older version's examples are still read and copied, and dependency changes can break them even when nobody edits that branch.

Finally, keep the conversion honest. When a page uses a construct the copy script does not support, record it as tested another way or not tested, rather than letting it disappear from the count. The docs testing checklist and the GitHub Actions guide show how to keep such a record in a release routine, and the Python docs testing guide covers testing example files directly.

Where DocsAlive fits

DocsAlive can run supported fenced examples in the reviewed Markdown copy and classify findings. It preserves supported Python block order within a page and runs each page in a fresh container. See the CLI reference and findings guide for the execution and triage model.

Keep the Antora build and direct example-file tests alongside that scan. The copy is an input prepared for testing, and its fidelity must be checked whenever the site uses a construct outside the script’s supported subset. A health check is a one-off report for an eligible public repository; account for the conversion and coverage limits when interpreting it. Plans and limits are on the pricing page; the Open source plan is $0 per month for a public OSI-licensed repository.

The sources we checked

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

Source What it covers
Antora standard directories Component and module layout
Include an example Example resource IDs
Antora installation and build Building a site
Antora CLI options Build logging and failure level
AsciiDoc source blocks Source block syntax
Tagged regions Selecting included regions
downdoc Conversion and include limitations

FAQ

Does DocsAlive scan Antora pages directly?

No. Engine 0.6.3 scans Markdown and MDX, not .adoc pages. A raw Antora scan gives the AsciiDoc pages no coverage.

Why test both the example file and its selected regions?

The full file may contain setup or imports that the page omits. Testing both checks the maintained source and the fragment a reader actually sees.

Does a successful Antora build prove includes are present?

Not under every logging configuration. In the verified case a missing include was logged as an error while the build exited successfully; setting the log failure level to error made it fail.

Can downdoc alone prepare the scan?

Its documented conversion drops include directives. Resolve Antora resources with an appropriate preparation step and verify the generated copy against the rendered site.

Does the provided script support every Antora site?

No. It handles the stated source-block, example-include, tag and attribute patterns for this layout. Partials, cross-component resources and other unsupported constructs need separate handling.

What does a passing copied block prove?

It provides evidence for the supported check performed on that copied block under the test setup. Review the copy, skipped examples and direct file tests before drawing conclusions about the site.

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 GitBook documentation examples

Test the code examples in GitBook docs synced to Git: the space root, code tags, tabs, reusable includes, invisible characters, 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 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.