Guide

Testing Nextra documentation examples

Inventory fences in content/, app/ and pages/, run complete JavaScript examples, cover tab alternatives and generated npm2yarn commands, and read scan skips correctly.

Published
Updated
November 17, 2026
Reading time
14 min
Facts checked against
Nextra docs on the content directory, Tabs, syntax highlighting and npm2yarn, Nextra releases and setup-node, with the check script run on Python 3.13 and Node 24 (November 11, 2026)
Outlined documentation pages with a lime pulse line running out of the stack
On this pageThe short answerMap the source before testingWhy Nextra examples breakInventory fences and run JavaScriptAdd a build and source check to CIHow DocsAlive reads NextraTriage findings and coverage gapsPlan coverage around reader pathsWhere DocsAlive fitsThe sources we checkedFAQ

The short answer

Test Nextra examples from the authored source and from the reader’s intended path: inventory fences in content/, app/ and any older pages/ tree, run complete examples in suitable environments, and explicitly cover tab alternatives and generated content. A successful Next.js build does not prove the commands and code shown in the site still work.

Nextra 4 uses the Next.js App Router. Content can live in a content/ directory served through a catch-all route, or in page.mdx files under app/. Older projects may still have documentation under pages/. A migration can leave examples, imports and test paths referring to the old layout.

DocsAlive handles Nextra as plain Markdown and MDX in engine 0.6.3. It reads ordinary fence metadata without changing the language, but it has a verified limitation with Nextra’s Tabs.Tab structure: later same-language blocks can be skipped as alternatives. Treat those skips as unchecked and cover the affected blocks with your own CI script.

For general practice, see testing documentation code and testing static-site documentation.

Map the source before testing

A Nextra 4 site can use a content/ directory with a catch-all route such as app/[[...mdxPath]]/page.jsx. It can also place page.mdx files directly in the App Router tree. Earlier Nextra versions commonly used pages/. A repository may temporarily contain more than one of these layouts during migration, so inspect the actual source rather than assuming one directory is complete.

Code blocks use syntax highlighting at build time. Fence metadata can identify a filename, enable copying or line numbers, highlight lines, or highlight a substring. That metadata helps readers understand the example, but it is not part of the program. A source scanner should take the first word of the fence info string as the language and leave the rest as presentation metadata.

Nextra’s Tabs component uses an items list and a Tabs.Tab for each choice. storageKey can persist a reader’s selection, while defaultIndex chooses an initial tab. Those interface features make alternatives easier to navigate; they do not establish that every alternative installs or runs correctly.

The npm2yarn feature generates package-manager tabs from one source fence containing an npm command. The pnpm, yarn and bun variants appear in built output rather than as independent commands in that source fence. Review the generated variants if you support them, especially when a command contains options or syntax whose translation matters.

Why Nextra examples break

A package name or CLI flag can change while an old command remains in a page. Package-manager alternatives can drift apart when authors maintain them manually. A code example can use an API from a different framework version than the version installed earlier in the tutorial.

MDX adds another dependency: imports and components must still resolve in the project layout. An App Router migration can move a page while leaving an import path or a CI scan pointed at pages/. A page can build in one repository state and fail after a component or dependency is renamed.

Some visible examples are not stored as ordinary fenced blocks. A component can render code from props, fetch remote content or receive content generated during a build. Scanning checked-in Markdown and MDX will not find an example that only exists in that later output. Identify its source and test or inventory it at the stage where it exists.

A highlighted snippet may also be an intentional fragment. Running it in isolation can produce a missing-variable failure even when the surrounding tutorial supplies the value. Conversely, a test that silently supplies undocumented setup can hide a real gap. Keep the reader’s starting state visible.

Classify the blocks

Source form Suitable treatment Coverage question
Complete JavaScript block Run in the documented runtime and environment Does it require prior page state or local files?
Shell command Run only under a deliberate safety and environment policy Does it install or modify anything?
Manual package-manager tabs Test supported alternatives separately Are the commands still equivalent?
npm2yarn source fence Test the npm source and inspect generated alternatives Are the built variants appropriate for the supported tools?
Fragment or highlighted edit Review in context and test a complete fixture Can a reader reach the final working state?
MDX import or component Build and test the page or component Did a migration change the import path?
Remote or generated example Test at its source or after generation Is the visible example present in the scanned repository?
Output sample Assert stable claims separately Which values may vary?

A classification is useful when it drives a decision. “Skipped” should mean that a maintainer knows why a block was not run and where any needed coverage lives.

Inventory fences and run JavaScript

Save the following as check_nextra.py at the repository root and run python3 check_nextra.py. It requires Python 3.12 or later and Node 20 or later. The script scans existing content/, app/ and pages/ trees for .md and .mdx files.

It reports counts by language, identifies npm2yarn metadata, and runs js blocks in separate temporary files. It skips a block when its first line is // fragment or # fragment. Shell blocks are inventoried but not executed by this script.

#!/usr/bin/env python3
from collections import Counter
from pathlib import Path
import re
import subprocess
import sys
import tempfile

ROOTS = [Path("content"), Path("app"), Path("pages")]
SUFFIXES = {".md", ".mdx"}
OPEN = re.compile(r"^ {0,3}(`{3,}|~{3,})(.*)$")


def blocks(path):
    lines = path.read_text(encoding="utf-8").splitlines()
    index = 0
    while index < len(lines):
        match = OPEN.match(lines[index])
        if not match:
            index += 1
            continue
        marker = match.group(1)
        info = match.group(2).strip()
        words = info.split()
        language = words[0].lower() if words else "(unlabeled)"
        start = index + 1
        index += 1
        body = []
        close = re.compile(
            r"^ {0,3}" + re.escape(marker[0])
            + r"{" + str(len(marker)) + r",}\s*$"
        )
        while index < len(lines) and not close.match(lines[index]):
            body.append(lines[index])
            index += 1
        yield start, language, words[1:], "\n".join(body), index < len(lines)
        index += 1


def main():
    roots = [root for root in ROOTS if root.is_dir()]
    if not roots:
        print("No content, app or pages directory found", file=sys.stderr)
        return 1

    counts = Counter()
    failures = 0
    executed = 0
    fragments = 0
    generated_tabs = 0
    for root in roots:
        paths = sorted(p for p in root.rglob("*") if p.suffix in SUFFIXES)
        for path in paths:
            for line, language, meta, body, closed in blocks(path):
                counts[language] += 1
                location = f"{path}:{line}"
                if not closed:
                    print(f"FAIL {location}: unclosed fence")
                    failures += 1
                if "npm2yarn" in meta:
                    print(f"INFO {location}: npm2yarn; only npm is in source")
                    generated_tabs += 1
                first = body.splitlines()[0].strip() if body.splitlines() else ""
                if first in {"// fragment", "# fragment"}:
                    print(f"SKIP {location}: fragment")
                    fragments += 1
                    continue
                if language != "js":
                    continue
                with tempfile.TemporaryDirectory() as directory:
                    script = Path(directory) / "block.js"
                    script.write_text(body + "\n", encoding="utf-8")
                    try:
                        result = subprocess.run(
                            ["node", str(script)],
                            capture_output=True,
                            text=True,
                            timeout=30,
                            check=False,
                        )
                    except (OSError, subprocess.TimeoutExpired) as error:
                        print(f"FAIL {location}: {error}")
                        failures += 1
                        continue
                executed += 1
                if result.returncode:
                    print(f"FAIL {location}: node exited {result.returncode}")
                    print(result.stderr, end="")
                    failures += 1
                else:
                    print(f"PASS {location}")

    print("\nBlocks by language:")
    for language, count in sorted(counts.items()):
        print(f"  {language}: {count}")
    print(
        f"Executed: {executed}; fragments: {fragments}; "
        f"npm2yarn fences: {generated_tabs}; failures: {failures}"
    )
    return 1 if failures else 0


if __name__ == "__main__":
    sys.exit(main())

The script uses the first word of the info string as the language. Metadata such as filename=, copy, showLineNumbers and brace-based highlights does not become part of the language. The script reports an npm2yarn fence because only its npm command is present in source; it does not test the generated package-manager choices.

This is a small source scanner, not a complete MDX parser. It handles ordinary backtick and tilde fences, but unusual nesting or code assembled by components needs separate review. It also runs only the js label. A javascript, TypeScript or shell block is counted but not executed.

Each JavaScript block runs in its own temporary file. That means it cannot rely on variables from an earlier block, and relative imports resolve from the temporary directory. Use a separate test for a tutorial sequence, repository-relative files or installed packages. Do not use the fragment marker to conceal a complete example that should run.

Cover shell and package-manager paths deliberately

The script does not execute shell blocks because a documentation command may install software, contact a service or modify files. Create dedicated tests for commands you intend to run, with a clean working directory and clear prerequisites. Test each supported package-manager path separately when its setup differs.

For npm2yarn, the checked-in npm command is the source of the generated tabs. A passing npm check is useful, but it is not proof that every generated command behaves as intended with its package manager. Inspect the rendered choices and run representative generated commands in their own environments. Fumadocs has a similar transform for npm fences; see testing Fumadocs documentation examples.

When a page shows a diff or an incomplete change, test the completed file a reader should have after following the instructions. Keep the starting fixture and the intended result close to the tutorial so a later edit prompts a review of both.

Add a build and source check to CI

The following workflow is illustrative configuration. It assumes a lockfile, an npm build script and the checker above at the repository root. Adapt the triggers and commands to the repository.

name: Documentation checks
on:
  push:
  pull_request:
jobs:
  docs:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - uses: actions/setup-node@v7
        with:
          node-version: '24'
      - run: npm ci
      - run: npm run build
      - run: python3 check_nextra.py

The build can catch broken MDX imports and rendering integration problems that a fence scanner does not see. The source script can identify and run a narrow class of examples that a build may only render. Neither check establishes that a remote API, generated example or every tab works.

Record the runtime and package versions used by CI. If documentation describes a released package, test the artifact a reader will install as well as the checkout where appropriate. A passing check against an unpublished local change does not prove the published installation path works.

How DocsAlive reads Nextra

Engine 0.6.3 does not detect Nextra configuration as a dedicated framework. It handles the repository as plain Markdown and MDX. Without a top-level docs/ directory, Markdown and MDX files under the repository root are scanned subject to excluded directories; .next is excluded. If a top-level docs/ directory exists, the default selection is that directory plus the README. Review the selected pages and use the CLI’s --docs-dir option when the intended content is elsewhere.

Fence metadata such as a filename, copying option, line-number option or line highlight leaves the first-word language intact. The engine plans supported languages according to their own rules. An unmapped label is a known limitation: it can be reported as passing without execution or parsing. Treat that as unchecked.

The engine sees an npm2yarn source fence as one block containing the npm command. It does not see the pnpm, yarn and bun variants generated only in built HTML as separate source blocks. Remote content and examples generated at build time are likewise absent from a source scan when they are not present as scanned files.

The verified Tabs.Tab limitation

Nextra’s Tabs.Tab children are not recognized as one ordinary tab group in engine 0.6.3. Each opening Tabs.Tab line starts a new group, and its closing line does not close that group in the parser. This has two practical effects.

First, each tab’s block is planned separately instead of selecting one variant for the whole Nextra component. For a package-manager group, the npm command can run while pnpm and yarn commands are skipped as host-tool commands.

Second, a block after the tabs can be incorrectly grouped with a tab block. If that later block has the same language as the tab, such as a later sh block after an npm sh tab, it can be skipped with the reason “alternative variant.” That later block did not run. Read these skips on Nextra pages as unchecked and cover the affected blocks with your own CI script.

Block or source form Engine behavior in 0.6.3
Markdown or MDX fence in a scanned page Extracted and planned according to language and contents
Fence with Nextra presentation metadata First word remains the language; metadata does not become code
Nextra Tabs.Tab children Each tab is planned separately because the children are not recognized as one group
Later same-language block after tabs Can be incorrectly skipped as an alternative variant; treat it as unchecked
pnpm or yarn command Can be skipped as a host-tool command
npm2yarn source fence One npm source block is seen; generated alternatives are not separate source blocks
Remote or build-generated content absent from source Not scanned
Unmapped language label Reported as pass without being run or parsed
jsx or tsx Not judged
Recognized output block Skipped; contents are not validated

A block introduced as output or response is not compared with program output. Printed output is compared only for pycon or python-repl sessions. Add independent assertions for JavaScript values, HTTP responses and other output claims.

Network and credential rules also affect coverage. Blocks containing HTTP URLs, package installation commands or npx are marked as needing network; with --no-network, applicable shell and HTTP blocks are skipped. Common credential placeholders cause a skip categorized as needing credentials. Review those reasons before interpreting a report as coverage of the full page.

Triage findings and coverage gaps

Finding Investigate Action
MDX build fails after moving a page Component and import paths, App Router layout Repair the import or move the shared component deliberately
JavaScript block fails in isolation Earlier state, files and runtime version Test the complete reader path and clarify setup
Later block is skipped as an alternative Whether it follows Tabs.Tab and shares a language Treat it as unchecked and add an independent CI check
pnpm or yarn tab is skipped Supported package managers and available tools Run the alternative in its own suitable environment
npm2yarn source passes Generated commands and their actual environments Inspect and test supported generated variants
Unmapped label reports pass Whether a checker exists Use a suitable independent parser or runtime
Remote example is missing from the scan Where the content is authored or generated Test at the source or generated-output stage
Output sample is skipped Which values the page promises Add a separate assertion for stable claims

Keep the evidence needed to reproduce a finding: source page and line, package version, runtime, setup, command and observed failure. A missing fixture may reflect a test harness that is too isolated, or a prerequisite that the page fails to explain. Decide which before changing the example.

Plan coverage around reader paths

Start with installation, first use and common configuration. For each path, list the files a reader visits, the choices offered in tabs, the dependencies and the expected result. A page-level scanner gives useful locations, while a path-level test can reveal a failure caused by steps interacting across pages.

Treat package-manager tabs as alternatives. Run them in separate environments rather than executing every command in sequence. If a choice is persisted with storageKey, inspect whether the labels and ordering remain understandable across related groups. That is a reader experience check as well as a code check.

For an App Router migration, search both old and new trees until the migration is complete. Check that CI scans the files actually published, that imports resolve from their new locations, and that removed pages do not remain the only tested copies of important examples. A build helps with imports; an inventory helps expose source files that the testing workflow overlooks.

For remote or generated content, identify the system that owns the example. Test its source where possible, and add a check after generation if the build transforms the command or code. A source-only report cannot provide evidence about content it never received.

Use this checklist during review:

[ ] Identify content, app and older pages source trees.
[ ] Build the site with the intended dependency versions.
[ ] Inventory fences and review their language labels.
[ ] Mark intentional fragments and test their complete context.
[ ] Test supported package-manager alternatives separately.
[ ] Inspect and test generated npm2yarn choices where needed.
[ ] Review alternative-variant skips after Nextra tabs.
[ ] Test MDX imports and components after route migrations.
[ ] Locate remote and build-generated examples.
[ ] Assert important output in a dedicated test.
[ ] Record skipped blocks and the coverage that replaces them.

Where DocsAlive fits

DocsAlive extracts examples from scanned pages, plans supported blocks, executes them when requested and classifies results. It preserves page order for supported examples and provides findings that help distinguish likely documentation defects from missing context, credentials and external failures.

Use the CLI to select the intended source and request execution. A scan without --execute is an extraction and planning pass. Review findings together with the Nextra tab limitation above, and keep independent checks for skipped alternatives, generated content and output assertions.

The Starlight guide covers another MDX-based documentation layout. For API commands inside Nextra pages, the curl and HTTP examples guide explains why status and response assertions need special care. The documentation testing checklist can help turn the inventory into an ongoing review process.

The sources we checked

These sources were read on November 11, 2026.

Source What it covers
Nextra documentation Nextra concepts and current documentation
Nextra content directory Content directory and App Router layout
Nextra tabs Tab items, persisted selection and defaults
Nextra syntax highlighting Fence metadata and highlighting
Nextra npm2yarn Generated package-manager alternatives
Nextra releases Published release history
GitHub checkout action Repository checkout in Actions
GitHub Node setup action Selecting Node in Actions

FAQ

Does a Nextra build execute documentation examples?

A build checks the configured site and can reveal rendering or import errors. It does not establish that every displayed command, response or tutorial sequence works.

Where should I look for Nextra source pages?

Inspect content and app for a Nextra 4 project, and include pages when it exists in an older or migrating repository. Confirm which files the published site actually uses.

How does DocsAlive handle Nextra tabs?

In engine 0.6.3, Tabs.Tab children are planned separately, and a later same-language block can be skipped as an alternative. Treat those skips as unchecked and cover the blocks with your own CI script.

Does an npm2yarn source fence contain every generated command?

No. The source contains the npm command; the other package-manager choices are generated at build time. Inspect and test the generated choices that your project supports.

Are remote or generated examples included in a source scan?

Examples absent from the scanned repository files are not scanned. Test their source or add a check at the stage where the generated content exists.

Does a passing unmapped fence label mean its code ran?

No. Engine 0.6.3 can report an unmapped label as passing without execution or parsing. Treat it as unchecked and use an appropriate independent checker.

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

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