Guide

Testing versioned Docusaurus docs

A fix in docs/ only changes Next. Test the released copies readers land on, and know which folders a scan actually covers.

Published
Updated
November 17, 2026
Reading time
14 min
Facts checked against
Docusaurus docs on versioning, the docs plugin and the CLI, and the Python 3.10 release notes, with every code block run on Docusaurus 3.10.2, Node and Python 3 (November 13, 2026)
Outlined documentation pages with a lime pulse line running out of the stack
On this pageThe short answerHow Docusaurus keeps versionsWhy versioned examples driftChoose the versions to testSee what the engine collectsCheck the version inventoryTriage an old-version failurePut the check into the release workflowWhere DocsAlive fitsThe sources we checkedFAQ

The short answer

Test each Docusaurus version that your team still expects readers to use, including the latest release, supported older releases, and the current unreleased documentation. In engine 0.6.3, a default DocsAlive scan covers only docs/, which is Next by default; it skips versioned_docs, including the release readers normally see first. An include glob cannot reach that skipped folder. Scan each release with --docs-dir, then review the extra root README and the reported framework. This is an engine limitation, not a Docusaurus bug.

Docusaurus versioning preserves a copy of your documentation at a release point. That is useful for readers who have not upgraded, but it also preserves mistakes and assumptions from that point in time. A later correction in docs/ does not automatically repair an older copy. Meanwhile, a language runtime, dependency, installation path, or API can change around an example that has remained untouched.

A documentation build and an example test answer different questions. A build can confirm that Docusaurus can produce the site; it does not establish that every command or code sample works in the environment readers will use. Treat version coverage as an explicit release decision and keep a record of what was actually run.

The walkthrough below uses a small site to make those boundaries visible. The files and version names are illustrative, and the intentionally outdated import demonstrates a real runtime change. The commands and results were checked with Docusaurus 3.10.2 and engine 0.6.3.

How Docusaurus keeps versions

By default, docs/ holds the current documentation, labeled Next and served under /docs/next/ once versioned documentation is present. Running the version command copies that directory into a named folder under versioned_docs/, writes a corresponding file under versioned_sidebars/, and records the version in versions.json.

The first entry in versions.json is the latest version. By default, that is the version readers see at the unversioned documentation path. Older versions can remain published at version-specific paths with a banner indicating that they are no longer actively maintained. The exact content and support promise are still yours to manage. See the Docusaurus versioning guide and CLI reference.

The docs plugin exposes settings that affect the built site. lastVersion defaults to the first entry in versions.json and selects the version shown by default. includeCurrentVersion defaults to true. onlyIncludeVersions limits which versions are built; the versioning guide suggests limiting development and deploy previews to two or three versions. These options do not change what engine 0.6.3 scans. The engine does not read those version settings, versions.json, or the versioned sidebar files. See the docs plugin reference.

Create a small versioned site

Start with a site created from the classic template. In the checked project, the template tutorial folders were removed afterward so that docs/ contained only the two files shown next. The creation command resolved to Docusaurus 3.10.2 in that run.

npx --yes create-docusaurus@latest dsite classic --javascript --package-manager npm --skip-install
cd dsite && npm install

The illustrative docs/intro.mdx below is the 1.0 source. Its import of Mapping is outdated on purpose: Python 3.10 removed the deprecated collection aliases from collections. The page also imports a partial and presents two different-language tabs.

---
sidebar_position: 1
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import Install from './_install.mdx';

# Getting started

<Install />

Check that the defaults are a mapping:

```python title="check_defaults.py"
from collections import Mapping

defaults = {"retries": 3, "timeout": 10}
print(isinstance(defaults, Mapping))
```

Serialize the defaults:

```pycon
>>> import json
>>> json.dumps({"retries": 3, "timeout": 10}, sort_keys=True)
'{"retries": 3, "timeout": 10}'
```

<Tabs groupId="runtime">
  <TabItem value="python" label="Python" default>

```python
print(sorted({"timeout": 10, "retries": 3}))
```

  </TabItem>
  <TabItem value="node" label="Node.js">

```js
console.log(Object.keys({ timeout: 10, retries: 3 }).sort());
```

  </TabItem>
</Tabs>

The illustrative docs/_install.mdx is the imported partial. Docusaurus excludes underscore-prefixed files from pages by default; in the checked build there was no separate route for this file.

Check your Python version first:

```bash
python3 --version
```

Cut the 1.0 version from the files as they stand. The command creates the versioned copy, sidebar file, and version list entry.

npm run docusaurus docs:version 1.0

The checked command completed successfully and ended with this line:

[SUCCESS] [docs]: version 1.0 created!

Now correct the import in docs/intro.mdx only. This illustrative change repairs Next, while the 1.0 copy keeps the old import.

-from collections import Mapping
+from collections.abc import Mapping

Build the site after the correction:

npm run build

The build succeeded. With only 1.0 cut, /docs/intro/ served the 1.0 copy containing the old import. The fixed page was at /docs/next/intro/ under an unreleased-documentation banner. A successful build therefore did not establish that the default page's Python example would run.

After cutting 2.0 from the fixed docs/, the illustrative versions.json contained the newest version first:

[
  "2.0",
  "1.0"
]

In that build, 2.0 appeared at /docs/intro/, 1.0 remained at /docs/1.0/intro/ with a no-longer-maintained banner, and Next remained at /docs/next/intro/. A banner tells readers about maintenance status; it does not test or repair the example.

The version command also wrote this illustrative sidebar file for 1.0:

{
  "tutorialSidebar": [
    {
      "type": "autogenerated",
      "dirName": "."
    }
  ]
}

The sidebar helps Docusaurus construct navigation for the frozen copy. It is also a useful item to check for presence when auditing a release, but its existence alone says nothing about whether the page's examples work.

Why versioned examples drift

A version copy can remain unchanged while the environment around it moves. A reader may run an old import with a newer Python interpreter, install a dependency whose current release has removed an API, or follow a command whose prerequisite has changed. In the example above, Python's 3.10 release notes explain the removal behind the failure; the engine's runner image uses Python 3.12.

Fixes also tend to land where maintainers are already working: docs/. That is appropriate for the next release, but it leaves each frozen version to be considered separately. A fix may be applicable to several copies, only one copy, or none of them if the older product actually behaves differently.

Partials add another version boundary. When a version is cut, the partial is copied with the rest of docs/. Editing the current partial does not update the copied ones. A reader sees the partial inside the page, but a scanner may treat the underlying files differently. That distinction matters when an example depends on setup established by the surrounding page.

Finally, old versions can remain visible long after their release checks have stopped running. Decide which copies are still promises to readers and give them a testing schedule. If a version is no longer supported, decide whether to keep it available with clear context or retire it. A banner and a green site build are not substitutes for that decision.

Choose the versions to test

The team owns the support decision. A practical classification is:

Version class Why test it What to decide
Latest released version It is normally the default landing version and represents the current released product. Which runtime and released artifact reflect the reader's path?
Still-supported older versions Readers may deliberately select these copies and rely on their instructions. Which releases remain supported, and which environments should each use?
Next It catches problems before the next documentation release. Which unreleased product state and prerequisites should the examples use?
Retired or unsupported versions They may still be published and found through search. Whether to keep, label, repair, or retire each copy.

Do not assume that all versions should run against the same package build. A release-specific example may need the artifact for that release, while Next may need a development build. Record the setup and dependencies for each run so a failure can be interpreted against the version the page actually describes.

For a broader approach to current documentation, see testing Docusaurus docs. The Read the Docs guide covers a different version model based on Git tags and branches.

See what the engine collects

The following command plans the default scan. Add execution when you want the planned examples run, as described in the CLI reference.

docsalive scan .

In the checked project, the engine detected Docusaurus and collected two pages from docs/, containing five blocks. It did not collect any release copy under versioned_docs. When executed, all five blocks passed, including both different-language tabs. That result describes Next in this project; it does not cover the broken 1.0 page that readers could still visit.

The engine scans the partial as its own page. Its shell block passed there, rather than running inside the page that imports it. The component tag in the introduction is not expanded. If the partial needs variables or files from the importing page, test the assembled reader journey separately.

An include filter cannot make a skipped folder eligible. This illustrative attempt collected zero pages:

docsalive scan . --include "versioned_docs/*"

Use the version directory as the scan's documentation directory instead:

docsalive scan . --docs-dir versioned_docs/version-1.0

For the checked 1.0 copy, the engine reported the framework as plain and collected three pages: the two version files plus the root README. It found five blocks. On execution, the old import failed as api-drift; the partial's shell block, the pycon session, and both language tabs passed. The same import in the corrected docs/ copy passed.

The distinction between planning and execution matters. A planning command identifies what would be handled; it is not evidence that examples ran. Review page counts and paths before relying on a result, and use the CLI's execution option for a run intended to test them.

Read the report in context

A failure category is a starting point for investigation. In this case, the removed import is a documentation problem when the page is meant to work on the tested runtime. A timeout or missing fixture can instead need review of the environment and page prerequisites. The findings reference explains the categories.

Only pycon sessions have their printed output compared by the engine. A difference is a warning categorized as output-differs; assess whether it represents a meaningful reader-facing problem. An output block is skipped, not validated. Also inspect skips and unsupported cases before treating a green summary as complete coverage.

One known limitation deserves special attention: an unknown fence label can be reported as passing without the block being run or parsed. Check the languages and reasons in the report, and use another suitable test for a format the engine does not handle.

Docusaurus versioning item What Docusaurus does What the engine does in 0.6.3
docs/ Holds current documentation, labeled Next by default. Detects Docusaurus and collects its Markdown and MDX pages from docs/ by default.
versioned_docs/ Stores copied release pages. Skips this folder during ordinary collection; an include filter cannot add it back.
A version directory selected with --docs-dir Contains the frozen pages for that version. Scans the selected directory as plain, adding the root README as an extra page.
versions.json Lists versions, newest first; its first entry is the default lastVersion. Does not read it to choose scan targets.
Versioned sidebar files Preserve navigation information for each version. Does not read them to determine example coverage.
Underscore-prefixed partial Is excluded as a standalone page by default and can be imported into a page. Scans the file as its own page; it does not expand the imported component.
Different-language tabs Present alternatives to a reader. Both ran in the checked component; only same-language variants are treated as alternatives.
Site version settings Control which versions are built or shown. Does not use those settings to change collection.

These observations apply to the checked engine release. They are not guarantees about every Docusaurus configuration or a substitute for inspecting the page list in your own report.

Check the version inventory

A small inventory check can catch a missing folder or sidebar before a scan is scheduled. The following illustrative scripts/check_versions.py reads the version list, checks those two items for each entry, and prints a scan command. It does not run the scans or validate the content.

import json
import sys
from pathlib import Path

root = Path(".")
versions = json.loads((root / "versions.json").read_text())
missing = 0
for v in versions:
    docs = root / "versioned_docs" / f"version-{v}"
    sidebar = root / "versioned_sidebars" / f"version-{v}-sidebars.json"
    pages = sorted(p for p in docs.rglob("*") if p.suffix in {".md", ".mdx"}) if docs.is_dir() else []
    if not docs.is_dir() or not sidebar.is_file():
        print(f"version {v}: missing {docs if not docs.is_dir() else sidebar}")
        missing += 1
        continue
    print(f"version {v}: {len(pages)} pages -> docsalive scan . --docs-dir {docs}")
print("current (Next): docs/ -> docsalive scan .")
sys.exit(1 if missing else 0)

Run the inventory from the repository root:

python3 scripts/check_versions.py

For the two-version probe, it completed successfully and produced this illustrative inventory:

version 2.0: 2 pages -> docsalive scan . --docs-dir versioned_docs/version-2.0
version 1.0: 2 pages -> docsalive scan . --docs-dir versioned_docs/version-1.0
current (Next): docs/ -> docsalive scan .

The next result is broken on purpose: the version list names 2.1, but its documentation folder is absent. The check exited with a failure. It does not tell you why the folder is missing or whether the other versions' examples pass.

version 2.1: missing versioned_docs/version-2.1
version 2.0: 2 pages -> docsalive scan . --docs-dir versioned_docs/version-2.0
version 1.0: 2 pages -> docsalive scan . --docs-dir versioned_docs/version-1.0
current (Next): docs/ -> docsalive scan .

The following illustrative loop invokes a scan for every listed release. In the checked run it exited successfully, and each scan reported three pages because the root README was added each time.

for v in $(node -p "require('./versions.json').join(' ')"); do
  docsalive scan . --docs-dir "versioned_docs/version-$v"
done

This loop plans scans as written; it does not execute their examples. It also does not scan Next, select a support subset, set release-specific dependencies, or prove that all commands succeeded independently merely from the loop's final status. Version names must be suitable for the shell splitting used here. Adapt the orchestration to your repository, inspect each report, and run the current documentation separately. The inventory script counts .md and .mdx files, whereas the engine also recognizes .markdown pages, so its count is not a complete engine coverage measure.

Triage an old-version failure

A finding in a frozen copy needs a version-specific decision. The same textual change is not necessarily correct for every release. Confirm the page's intended product version, reproduce the failure with an appropriate environment, and identify whether the reader can still reach the page.

Finding Possible team decision Check before acting
The example is wrong for the old version's supported environment. Fix the version copy. Verify the correction against that version's behavior and review the page around it.
A correction applies to several supported releases. Backport the fix to the relevant copies. Test each copy with its own setup; do not assume identical text means identical behavior.
The version is no longer supported and should not remain available. Retire the version under the team's publishing policy. Account for existing links and communicate the support decision.
The failure depends on a newer runtime than the version supports. Clarify prerequisites or decide whether to add support. Compare the tested runtime with the page's actual promise.
The report shows a missing fixture or other uncertain result. Investigate before changing the page. Determine whether the fixture is documented, supplied by the test, or genuinely absent.

These are team decisions. Keep the reason with the change so a future maintainer can distinguish a deliberate historical constraint from an overlooked bug.

Put the check into the release workflow

Run the inventory when version metadata changes. Test Next during normal documentation work, test the release copy as part of a release process, and schedule checks for supported older copies when their dependencies or runtimes can drift. A post-release run against a shipped artifact can detect a publication problem, but it cannot block a release that has already occurred.

Use a fresh environment that matches the documented prerequisites. Record any setup supplied by the test, and do not let a helper silently install something the reader was supposed to install. For long tutorials, also follow the complete path across pages: a page-level run does not prove that a reader can carry state through a multi-page journey.

This checklist can be pasted into a release issue:

[ ] List the latest release, supported older versions, and Next.
[ ] Record the owner and support decision for each published version.
[ ] Check each listed version has its documentation folder and sidebar.
[ ] Select the intended runtime and product artifact for each version.
[ ] Plan and execute a separate scan for each selected release directory.
[ ] Scan Next separately and inspect the collected page paths.
[ ] Account for the root README added to each release-directory scan.
[ ] Review partials, tabs, skips, unknown labels, and cross-page journeys.
[ ] Triage findings and decide where fixes or backports belong.
[ ] Record any version retired and the handling of existing links.
[ ] Save reports and schedule the next check for supported versions.

Where DocsAlive fits

DocsAlive runs supported documentation examples in isolated page environments and sorts results into findings that help distinguish likely documentation bugs from noise. Its report includes page and line information, status, category, and reasons. Review the collected pages and skipped blocks alongside failures; a report is evidence about the material actually handled, not every promise on the site.

For versioned Docusaurus documentation in engine 0.6.3, explicitly target each release directory and separately scan Next. Keep the version inventory and support policy in your own workflow, because the engine does not infer them from Docusaurus settings. See how documentation testing works, the framework reference, and the documentation testing checklist.

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
Docusaurus versioning Creating, publishing, and navigating documentation versions
Docusaurus docs plugin reference Version settings and default page exclusions
Docusaurus CLI The documentation version command
What's New in Python 3.10 Removal of deprecated collection aliases

FAQ

Does a default DocsAlive scan test released Docusaurus versions?

No. In engine 0.6.3 it scans only docs/, the unreleased Next version by default, and skips versioned_docs. An include glob cannot reach that skipped folder. Use --docs-dir for each release copy; the scan reports plain and also adds the root README.

Why can the default documentation page contain an old example?

The first entry in versions.json is the latest release and is shown by default under the standard settings. A correction made later in docs/ changes Next, but it does not automatically change the released copy.

Which old versions should we test?

The team should decide which versions remain supported and what readers can expect from them. Test the latest release and each supported older version against appropriate environments, and make a deliberate decision about copies that are no longer supported.

Does the engine test an imported partial inside its page?

In the checked project it scanned the underscore-prefixed partial as its own page and did not expand the imported component in the introduction. Test any setup or state shared between the partial and its surrounding page separately.

Do both tabs in a Docusaurus component run?

In the checked component, the Python and JavaScript tabs both ran because they used different languages. The engine treats same-language variants as alternatives, so inspect the report and arrange additional coverage where needed.

Does a successful site build prove examples work?

No. The checked site built successfully while its 1.0 copy retained an import that failed on the engine's Python runtime. Build the site and test the examples as separate checks, then review the version and environment associated with each result.

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 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 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.