Guide

Testing Docsify documentation examples

Run the inline examples, test every embedded file and fragment directly, and know that each docsify-tabs variant runs as its own block.

Published
Updated
November 17, 2026
Reading time
12 min
Facts checked against
Docsify docs on embedded files, language highlighting, configuration and helpers and the docsify-tabs docs, with every code block run or rendered on docsify-cli 5.0.0, Docsify 5 in headless Chromium and Python 3.13 (November 12, 2026)
Outlined documentation pages with a lime pulse line running out of the stack
On this pageThe short answerWhere Docsify keeps examplesClassify what a page presentsPlan a scan and read its scopeCheck embeds and tab setsBreak a fragment deliberatelyTriage the resultsWhere the product fitsA pasteable review checklistThe sources we checkedFAQ

The short answer

Test a Docsify site at both the Markdown page and embedded-file boundaries. DocsAlive can run supported inline examples and sort findings, but engine 0.6.3 treats Docsify as plain Markdown: it does not scan the HTML configuration or embedded code files, and it runs each docsify-tabs variant separately. Test embedded files directly, check fragment markers and review the rendered site as well as the scan report.

Where Docsify keeps examples

A typical Docsify site keeps its source in docs/. Its index.html loads Docsify and sets window.$docsify; README.md is the home page, and a configured _sidebar.md supplies navigation. Docsify renders Markdown in the browser, so a problem in a page, embed or configuration may remain unnoticed until someone opens that page.

Code can be inline in a Markdown fence or displayed from another file through an embed. An embed can force code presentation and select a named fragment between markers. This lets a project test a real source file in CI while showing only the relevant lines to readers. It also introduces a boundary: a Markdown scanner may see the embed link without ever seeing the code displayed by the browser.

The following command creates the small site used in this walkthrough. It requires network access for the package command.

npx --yes docsify-cli@5.0.0 init ./docs

The checked command created docs/index.html, docs/README.md and docs/.nojekyll. The edited HTML below is illustrative configuration. It enables the sidebar, loads Docsify, then loads the Bash and Python Prism grammars and the docsify-tabs plugin.

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>Example Docs</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsify@5/dist/themes/core.min.css">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsify@5/dist/themes/addons/vue.min.css">
</head>
<body>
  <div id="app"></div>
  <script>
    window.$docsify = {
      name: 'Example Docs',
      loadSidebar: true,
      subMaxLevel: 2
    }
  </script>
  <script src="https://cdn.jsdelivr.net/npm/docsify@5"></script>
  <script src="https://cdn.jsdelivr.net/npm/prismjs@1/components/prism-bash.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/prismjs@1/components/prism-python.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/docsify-tabs@1"></script>
</body>
</html>

Prism highlights markup, CSS, C-like languages and JavaScript by default. Other grammars need to load after Docsify. A missing grammar changes highlighting; it does not establish whether the example is correct or executable. Review presentation in the browser, and test behavior separately.

The sidebar is a Markdown page with links. With sidebar loading enabled, it controls navigation; it can also be encountered by a Markdown scan.

- [Home](/)
- [Getting started](getting-started.md)

The next page contains an inline shell check, two installation-tool tabs, inline Python, an embedded fragment and a tip callout. The tab set uses comments and headings understood by the docsify-tabs plugin. Docsify 5 documents the bracketed callout form used here; its older callout forms are deprecated.

# Getting started

Check the Python version first.

```bash
python3 --version
```

Install the client.

<!-- tabs:start -->

#### **pip**

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

#### **pipx**

```bash
pipx --version
```

<!-- tabs:end -->

Build a request payload.

```python
import json
payload = {"status": "ok"}
print(json.dumps(payload))
```

The full client script, embedded from a file:

[client.py](_media/client.py ':include :type=code :fragment=demo')

> [!TIP]
> The embedded script runs as a file in CI, not as part of this page.

The embedded file is a complete Python program. The two matching markers delimit the fragment that Docsify displays. In the browser check, the page showed the two lines inside those markers. If a marker is renamed, removed or duplicated without updating the page, the displayed fragment can fail even when the source file itself still runs.

import json

### [demo]
payload = {"status": "ok", "items": 3}
print(json.dumps(payload, sort_keys=True))
### [demo]

The embed syntax can include a file, force its display as code and select a fragment. For non-Markdown, non-media files, Docsify can display the embedded file as code without forcing the type. A direct file test is useful precisely because the displayed content comes from a real source file; it should be paired with a check that the page points to the intended file and fragment.

Classify what a page presents

A Docsify page can mix instructions a reader should run with material that describes the site itself. Classify each form before deciding what a scan result means.

Docsify construct What the engine does in 0.6.3
Supported inline Python or shell fence Plans it for execution; execution requires a scan with --execute
Embedded code file Does not see the file through the embed link; test the file directly
docsify-tabs variants Does not group the tab set; plans each fenced variant separately
HTML configuration fence Skips it as not executable
index.html Does not scan it as a page
_sidebar.md Scans it as a Markdown page when it is in scope
Labeled output block Skips it rather than validating the displayed result
Unknown fence label Can report a pass without running or parsing it; this is a known limitation

Engine 0.6.3 detects neither Docsify's HTML configuration nor its client-side rendering as a framework. It treats the repository as plain Markdown and scans files ending in .md, .mdx or .markdown. It does not scan HTML or standalone code files. Without an explicit docs directory, it selects a top-level docs/ folder when one exists; otherwise, it scans the repository subject to its folder exclusions.

The engine reads fence labels rather than the browser's final rendering. Supported Python blocks run in page order in a shared interpreter, while supported shell blocks run in a shell. It compares printed output only in Python pycon or python-repl sessions. Review a report's stated action and skip reason instead of assuming every green result represents an executed example.

This distinction matters for tabs. The plugin presents pip and pipx as alternatives to a reader, but the engine does not recognize that tab syntax as a group. Both fences are planned independently. Each can be useful to test, provided the environment and expectations for each variant are explicit.

Plan a scan and read its scope

The following command plans a scan of the example repository. It does not execute blocks without --execute.

docsalive scan .

In the checked repository, the scanner selected docs/ automatically and found three pages: README.md, _sidebar.md and getting-started.md. It found four fenced blocks. It did not scan index.html and did not see the embedded client.py file.

When those four blocks were executed in the checked environment, the Python version command, pip tab and inline Python block passed. The pipx tab failed as missing-tool because both tab variants ran and that tool was unavailable. Missing-tool is not automatically a documentation bug. Determine whether the page promises the tool is already available, documents its installation or presents it as an optional prerequisite.

A scan of inline blocks therefore covers part of the site, not the whole rendered experience. The CLI reference explains scan scope and execution options; the findings reference describes how results are classified. For a site with an mdBook source and preprocessor instead, see testing mdBook examples.

Check embeds and tab sets

The following helper looks for common Docsify embed syntax and tab sets in Markdown files. It reports code files to test directly, checks that local targets exist and checks for two matching fragment markers. It also reports repeated fence languages in a tab set so a reviewer knows those variants will be tested separately.

"""Report Docsify syntax that hides code from a Markdown code scanner."""
import pathlib
import re
import sys

root = pathlib.Path(sys.argv[1] if len(sys.argv) > 1 else "docs")
EMBED = re.compile(r"\[[^\]]*\]\(([^)\s]+)\s+['\"]([^'\"]*:include[^'\"]*)['\"]\)")
FENCE = re.compile(r"^\s*(`{3,}|~{3,})\s*([\w+-]*)")
NOT_CODE = {".md", ".markdown", ".html", ".htm", ".mp3", ".mp4", ".ogg"}
problems = 0

for page in sorted(root.rglob("*.md")):
    in_fence, in_tabs, tab_langs = False, False, []
    for n, line in enumerate(page.read_text(encoding="utf-8").splitlines(), 1):
        f = FENCE.match(line)
        if f:
            if not in_fence and in_tabs:
                tab_langs.append(f.group(2).lower())
            in_fence = not in_fence
            continue
        if in_fence:
            continue
        if "<!-- tabs:start -->" in line:
            in_tabs, tab_langs = True, []
        elif "<!-- tabs:end -->" in line:
            dupes = sorted({l for l in tab_langs if tab_langs.count(l) > 1})
            if dupes:
                print(f"{page}:{n}: tab set repeats {', '.join(dupes)}; each tab is tested separately")
            in_tabs = False
        for target, opts in EMBED.findall(line):
            if target.startswith(("http://", "https://", "//")):
                print(f"{page}:{n}: remote embed {target} (not checked)")
                continue
            path = root / target.lstrip("/")
            is_code = ":type=code" in opts or path.suffix.lower() not in NOT_CODE
            if not path.exists():
                problems += 1
                print(f"{page}:{n}: embed {target} is MISSING")
                continue
            frag = re.search(r":fragment=([\w-]+)", opts)
            if frag:
                marks = re.findall(r"(?:///|###) \[" + re.escape(frag.group(1)) + r"\]", path.read_text(encoding="utf-8"))
                if len(marks) != 2:
                    problems += 1
                    print(f"{page}:{n}: fragment {frag.group(1)} not found twice in {target}")
                    continue
            if is_code:
                print(f"{page}:{n}: embeds code from {path}; test that file directly")
print(f"{problems} problem(s)")
sys.exit(1 if problems else 0)

Run the helper against the example's docs directory:

python3 scripts/docsify_check.py docs

It identifies the repeated Bash tab language and the embedded file, while reporting no missing target or fragment problem:

docs/getting-started.md:25: tab set repeats bash; each tab is tested separately
docs/getting-started.md:37: embeds code from docs/_media/client.py; test that file directly
0 problem(s)

The helper is intentionally narrow. It resolves embed paths from the docs root, matching the default relativePath setting. If a site sets relativePath: true, Docsify resolves paths from the current page instead, so adapt the helper before relying on its path results. It reports remote embeds without checking them, and its pattern matching is not a substitute for opening the rendered page.

It also does not prove that the two tab variants provide equivalent instructions. A pip command and a pipx command can both execute while installing different things or requiring different prior setup. Review each path as a reader would follow it, and state which tools are prerequisites. A passing version check alone does not establish that a real installation succeeds.

Break a fragment deliberately

The next command changes the page to name a fragment that does not exist. It is broken on purpose and should be reverted after the check.

sed -i 's/:fragment=demo/:fragment=setup/' docs/getting-started.md
python3 scripts/docsify_check.py docs

The helper exits with status 1 because it cannot find two matching markers for the new fragment:

docs/getting-started.md:25: tab set repeats bash; each tab is tested separately
docs/getting-started.md:37: fragment setup not found twice in _media/client.py
1 problem(s)

This is a page-to-file relationship failure. The Python file can remain valid while the browser no longer displays the intended region. Conversely, matching markers do not prove that the selected region is useful or that it has enough context for a reader. Inspect the rendered page after changing a fragment, especially when the surrounding file contains setup outside the displayed region.

Test the complete embedded file directly as well:

python3 docs/_media/client.py

The checked file printed the following result:

{"items": 3, "status": "ok"}

That direct run establishes that this file completed in the checked environment. It does not establish that every fragment is independently runnable, that the page links to the correct fragment, or that an inline scanner examined the file. Record those as separate checks so a change to one layer does not silently invalidate another.

The following GitHub Actions YAML is illustrative. It checks the local embed relationships and runs the embedded file. Adapt the paths, runtime and dependencies to the actual site; add the inline scan as a separate step if that is part of the repository's workflow.

name: docsify-examples
on:
  pull_request:
    paths:
      - "docs/**"
jobs:
  check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - uses: actions/setup-python@v7
        with:
          python-version: "3.13"
      - name: Check Docsify embeds and tab sets
        run: python3 scripts/docsify_check.py docs
      - name: Run the embedded client script
        run: python3 docs/_media/client.py

The workflow's path filter should include every location that can change the presented example. If embedded files live outside docs/, include those paths in the real workflow. A change to a shared file can affect several pages, so keep a list of consumers or search for references during review. Also test the shipped version or artifact when the documentation tells readers to install a published package.

Triage the results

A useful test report distinguishes an example that misleads readers from an environment or coverage limitation. Use the result together with the page, the embedded source and the intended reader path.

Finding What it may mean Next step
Inline invalid syntax A complete example may contain a real mistake Reproduce with the documented setup and correct the page if confirmed
Missing tool in a tab The runner lacks a tool used by one variant Check whether the tab documents the prerequisite; test that variant in a suitable environment
Missing embedded file A link or file path changed Correct the target and open the rendered page
Missing fragment markers The page and source file disagree on the selected region Restore or update both markers and verify the displayed lines
Embedded file passes directly The complete file runs in that environment Also check the page target, fragment and reader-visible context
Missing highlighting A Prism grammar may not be loaded Fix presentation separately from code correctness
Credential or external-service result The complete flow needs conditions the scan cannot supply Record the gap and use a separate authorized check where appropriate

A scan can surface likely documentation bugs such as invalid syntax or API drift, while missing tools, missing fixtures and credential-dependent examples require contextual review. Timeouts and external failures also need investigation before assigning blame to the page. See the documentation testing overview for the broader workflow.

Keep the browser in the loop. Open the home page and changed chapters, follow the sidebar, switch through every tab and inspect each changed embed. Confirm that the selected fragment includes enough information for its purpose and that callouts render as intended. Client-side rendering means a file can look plausible in source review yet fail to present correctly to readers.

Where the product fits

DocsAlive is useful for supported runnable fences and documented setup steps in Markdown pages. It can execute the examples in page order and classify results so maintainers can investigate likely defects without treating every environment failure as a broken page. Its scan report should be read alongside the direct file tests and rendered-site checks.

The boundary is particularly important for Docsify: index.html is configuration that needs its own review, an embed is a link to a file the scanner does not inspect, and docsify-tabs variants are separate blocks to engine 0.6.3. An HTML fence is skipped as not executable. Unknown labels can receive a pass without a checker, so inventory those labels and assign an appropriate test.

For configuration examples, a parser can establish syntax without proving that a setting exists or behaves as described. For user journeys, verify the actual installation, files, runtime and dependencies that readers need. The configuration examples guide and CLI examples guide cover those boundaries in more detail.

If you maintain a public repository and want an outside report, the health check is a one-off check of up to 40 documentation pages. It can help identify findings to review; the site-specific embed and rendering checks still need explicit coverage.

A pasteable review checklist

Copy this into a change description or issue and adapt it to the site:

[ ] Identify changed Markdown pages, embedded files and fragment markers.
[ ] Check index.html configuration and load language grammars after Docsify.
[ ] Verify sidebar links and open changed pages in a browser.
[ ] Switch through each tab and review each variant's prerequisites.
[ ] Run supported inline examples with the documented setup.
[ ] Check local embed targets and fragment marker pairs.
[ ] Test each embedded code file directly in an appropriate environment.
[ ] Confirm the rendered fragment contains the intended lines and context.
[ ] Review output and illustrative configuration separately from runnable code.
[ ] Investigate missing tools, fixtures, credentials and external failures.
[ ] Record any unchecked remote embeds and remaining coverage gaps.

The sources we checked

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

Source What it covers
Docsify Browser-rendered documentation and site structure
Docsify embedded files File embeds, code presentation and fragments
Docsify language highlighting Prism grammars and loading order
Docsify configuration Site options, including path resolution
Docsify helpers Callout syntax
docsify-tabs plugin Comment-and-heading tab sets

FAQ

Does the scanner detect Docsify automatically?

Engine 0.6.3 treats Docsify as plain Markdown. It can select a top-level docs folder automatically, but it does not interpret the HTML configuration as a framework definition.

Are embedded code files tested through their page links?

No. The scanner sees the Markdown link rather than the code file. Test embedded files directly and separately verify the target and fragment shown in the browser.

Why did both installation tabs run?

The engine does not group docsify-tabs syntax in version 0.6.3. It plans each fenced variant separately, so provide a suitable environment and review prerequisites for each path.

Does missing syntax highlighting mean an example is broken?

No. A missing Prism grammar affects presentation. Test the code separately and load the appropriate grammar after Docsify to address highlighting.

Does a successful embedded-file run prove the page is correct?

No. The page may name the wrong file or fragment, or display too little context. Check the markers and inspect the rendered page as well as running the file.

What should a Docsify pull request check cover?

Cover changed inline examples, embedded files and their fragment relationships. Include relevant source paths in the workflow, and review navigation, tabs and rendered pages when presentation changes.

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