Guide

Testing Hexo documentation examples

A Hexo build shows what is published, but tag plugins and drafts change what a scan sees. Build, then test a copy of what readers copy.

Published
Updated
November 17, 2026
Reading time
14 min
Facts checked against
Hexo docs on writing, configuration, setup, tag plugins, plugins and the server, with every code block run on Hexo 8.1.2, Node and Python 3 (November 14, 2026)
Outlined documentation pages with a lime pulse line running out of the stack
On this pageThe short answerWhat Hexo publishesWhy examples on Hexo sites break or go untestedBuild a small site and inspect its sourceSee what the source scan collectsMake a scan-ready copyTriage and maintain the coverageWhere DocsAlive fitsThe sources we checkedFAQ

The short answer

Test Hexo examples at both the source and rendered-page boundaries. Build the site to see what Hexo publishes, then run the examples readers can copy, including code inserted by tag plugins. In engine 0.6.3, DocsAlive does not detect Hexo: it treats this project as plain Markdown and, without a top-level docs/ folder, scans from the repository root. It scans drafts and scaffolds, never sees code supplied only through tag plugins, and runs supported JavaScript with Node without comparing its output.

A reliable check needs an explicit inventory of the pages and examples that matter. Hexo can assemble a page from a post and separate files, while a source scan reads the text it finds without rendering the site. A successful build therefore establishes that Hexo generated pages under its rules; it does not establish that every example on those pages runs.

The walkthrough below uses Hexo 8.1.2 and engine 0.6.3. It starts with a small illustrative site, shows the coverage gap, and then creates a scan-ready copy. The copy is a practical aid for this particular layout, with limits that should remain visible in your CI review. For the broader workflow, see static-site docs testing and testing JavaScript documentation.

What Hexo publishes

Hexo puts new posts in source/_posts and pages in source. Drafts live in source/_drafts and are not displayed by default. The --draft option or render_drafts setting renders them; publishing a draft moves it to _posts. A draft can be worth testing before publication, but a report should distinguish it from a currently published post.

Inside source, Hexo ignores hidden files and files or folders whose names start with an underscore, except _posts. Renderable files, including Markdown and HTML, are processed into public; other files are copied. The skip_render setting copies matching paths raw and can also exclude a post. Scaffolds in scaffolds/ are templates for new posts, not existing published pages. Hexo also supports other post formats through renderer plugins.

That distinction matters to a source scanner. In a plain project, engine 0.6.3 collects Markdown files according to its own rules. It does not render Hexo templates or decide whether Hexo would publish a particular source file. It scans underscore folders such as _posts and _drafts, and it can collect scaffolds. If a top-level docs/ folder exists, its default scope changes to that folder plus the root README when present.

Hexo's tag plugins introduce another boundary. A codeblock tag can put code on the page without a Markdown fence in the source. Hexo documents a backtick code block as equivalent to the codeblock tag. The include_code tag inserts a file from the configured code_dir, which defaults to source/downloads/code; its options include lang, from, and to. Raw tags protect their contents from processing. Tag plugins should not be wrapped inside Markdown syntax.

These features are useful to authors, but they mean a fence-only scan can miss code that readers see. Conversely, a scan can report a problem in a draft or scaffold that is not on the built site. Treat both as findings with an identified publication status.

Why examples on Hexo sites break or go untested

Most failures on a Hexo site are not exotic. They come from the distance between the Markdown file an author edits and the page a reader copies from. Five patterns account for most of that distance.

First, code can be assembled by tags. A post can hold a codeblock tag or an include_code tag instead of a fence, so the code a reader sees is either bounded by tag lines or stored in another file. A tool that only looks for fences never sees it, and the post can look fully covered while its most important example is untested.

Second, an included file can silently render nothing. The probe below shows an include_code tag that produced no code on the built page while the build reported success. A missing example is easy to overlook in review.

Third, drafts live in the repository. A draft can sit in source/_drafts for months while the API it describes changes. A source scan will report it, which is useful before publication but misleading in a report about the live site.

Fourth, scaffolds and starter content travel with the project. Scaffolds are templates, and the starter post includes commands that create posts and start a server. Run unattended, those commands change the working tree or keep running.

Fifth, the scripts folder is not a general folder for helper scripts. Hexo loads what it finds there, so a test helper placed there becomes part of every build.

Build a small site and inspect its source

The following setup is illustrative. The starter post is removed because its shell examples include commands that create a post and start a server. When the scan driver ran those blocks on the box, the first wrote an extra post and the server continued until the run was stopped.

npx hexo-cli init hsite
cd hsite
rm source/_posts/hello-world.md

A starter post is useful onboarding material, but it is still executable content if a scanner collects it. Review commands that write files or start long-running processes before including them in an automated run. A timeout can stop a run, but it does not turn a server command into a useful short example test.

The illustrative post below contains a normal Python fence, an included JavaScript file, Python inside a codeblock tag, and an HTML fence showing a theme variable.

---
title: Install the acme client
date: 2026-11-14 10:00:00
tags: python
---
Check your Python version first.

```python
import sys
major, minor = sys.version_info[:2]
print(f"Python {major}.{minor}")
```

The Node helper lives in the downloads folder:

{% include_code connect.js lang:javascript connect.js %}

Parse a version string:

{% codeblock version.py lang:python %}
parts = "2.4.1".split(".")
print(tuple(int(p) for p in parts))
{% endcodeblock %}

A theme snippet that shows the post title:

```html
<h1>{{ page.title }}</h1>
```

The post illustrates three different relationships between source and output. The Python and HTML fences are present as fences in the Markdown source. The JavaScript is in a separate file and is brought into the post by a tag. The second Python example is present in the source, but its boundaries are tag lines rather than fences.

The included file for this example is illustrative as well:

const hosts = ["api.acme-docs-demo.test", "backup.acme-docs-demo.test"];
const first = Array.isArray(hosts) ? hosts[0] : hosts;
console.log(`connecting to ${first}`);

Keeping a sample in a separate file can make it easier to test directly. It also creates a dependency between the tag's path and the file that Hexo finds. If the file moves, or the tag does not resolve as expected, the published page can lose its example even though the source file still exists.

The next file is a draft, and its import is broken on purpose for current Python versions. It is useful for demonstrating why publication status and test status should be recorded separately.

---
title: What changes in 3.0
tags: python
---
The 3.0 client accepts any mapping:

```python
from collections import Mapping
print(issubclass(dict, Mapping))
```

The import was removed from that location in Python 3.10. A draft check can catch that issue before publication. But if the goal is a report about the currently rendered site, calling this a published-page failure would misstate its impact.

Build the illustrative site with Hexo:

npx hexo generate

The build completed successfully. The following is the recorded build output, with theme asset lines omitted:

INFO  Validating config
INFO  Start processing
INFO  Files loaded in 172 ms
INFO  Generated: 2026/11/14/install-acme/index.html
INFO  13 files generated in 153 ms

The built post showed the normal Python fence, the contents of the JavaScript include with a view-raw link, the codeblock tag's Python with its caption, and the HTML example. The theme variable remained literal inside the backtick fence. No page was built for the draft.

Inspecting the built page matters because the source alone does not establish what a reader receives. In this case, the build confirms that the two tag-provided examples appear, but it does not execute them as a reader would.

A successful build can omit an include

The following change is broken on purpose for the observed setup. A Python file was placed at the corresponding path and the tag was changed to point to it.

-{% include_code connect.js lang:javascript connect.js %}
+{% include_code connect.py lang:python connect.py %}

Hexo exited successfully without a warning or error, and copied the Python file to public/downloads/code/. The built post nevertheless contained nothing where the tag appeared. In this Hexo 8.1.2 probe, the model listed that Python file as an asset rather than a page, while the tag looked it up among pages. The JavaScript file worked. These observations apply to those tested files; they do not establish the behavior of every other file type.

A missing example can be more difficult to notice than a broken example. Add rendered-page inspection to review when a tag or included path changes, particularly when a build gives no warning. A direct test of the source file is useful, but it cannot prove that the published page actually contains it.

See what the source scan collects

This command plans a scan; the default CLI invocation does not execute examples:

docsalive scan .

In the probe, the engine treated the project as plain Markdown and scanned from the root because there was no top-level docs/ folder. It collected five pages: three scaffolds, the draft, and the post. It extracted three blocks. When run, the normal Python fence passed, the HTML fence was skipped as not executable, and the unpublished draft failed as api-drift. The included JavaScript and the Python inside the codeblock tag were never seen.

The theme was under node_modules, a folder the collector skips. The engine also skips several other named folders, including build, dist, site, snippets, and _snippets. Other hidden folders are not skipped, and folders that start with an underscore, such as _posts and _drafts, are scanned. An include filter only narrows pages already collected; it cannot bring back a page from a skipped folder.

Hexo item What Hexo does What the engine does in 0.6.3
Post in _posts Renders the post when included in the build Scans its Markdown fences if collected
Draft in _drafts Does not display it by default; configured draft rendering can include it Scans the folder and does not identify the page as a draft
Scaffold Uses it as a template for new content Can collect its Markdown as a page during a root scan
Codeblock tag Renders its contents as code Does not extract code bounded only by tag lines
include_code tag Inserts the selected file content when resolved Reads the tag as source text and does not fetch the included file
Raw tags Protect content from processing Does not render the tags before extracting fences
HTML fence Displays an HTML example Skips it as not executable
skip_render path Copies the path raw or can exclude a post Does not apply that Hexo setting

These are different selection systems, so compare the inventory before interpreting a pass rate. A page count is a count of collected files, not proof that the same number of pages was published. Likewise, a block count cannot include tag-provided code that the extractor never encountered as a fence.

Make a scan-ready copy

The following illustrative script lives in tools/. Hexo loads JavaScript files in a top-level scripts/ folder during initialization. In the probe, putting this Python file there caused Hexo to print a script-load error while still exiting successfully.

"""Write a scan-ready copy of Hexo posts: tag-plugin code becomes plain fences."""
import re
import sys
from pathlib import Path

src, out = Path(sys.argv[1]), Path(sys.argv[2])
code_dir = src / "downloads" / "code"  # Hexo's default code_dir
OPEN = re.compile(r"^\{%\s*(?:codeblock|code)\b(.*?)%\}\s*$")
CLOSE = re.compile(r"^\{%\s*(?:endcodeblock|endcode)\s*%\}\s*$")
INCLUDE = re.compile(r"^\{%\s*include_code\b(.*?)%\}\s*$")
RAW = re.compile(r"^\{%\s*(?:raw|endraw)\s*%\}\s*$")


def lang_of(args):
    m = re.search(r"lang:(\w+)", args)
    return m.group(1) if m else ""


def convert(text):
    lines, result = text.split("\n"), []
    for line in lines:
        if RAW.match(line):
            continue
        m = INCLUDE.match(line)
        if m:
            args = m.group(1)
            start = re.search(r"from:(\d+)", args)
            end = re.search(r"to:(\d+)", args)
            path = re.sub(r"(lang|from|to):\S+", "", args).split()[-1]
            body = (code_dir / path).read_text().split("\n")
            body = body[int(start.group(1)) - 1 if start else 0:int(end.group(1)) if end else None]
            result += ["```" + lang_of(args)] + "\n".join(body).strip().split("\n") + ["```"]
            continue
        m = OPEN.match(line)
        if m:
            result.append("```" + lang_of(m.group(1)))
        elif CLOSE.match(line):
            result.append("```")
        else:
            result.append(line)
    return "\n".join(result)


for page in sorted((src / "_posts").rglob("*.md")):
    target = out / "posts" / page.relative_to(src / "_posts")
    target.parent.mkdir(parents=True, exist_ok=True)
    target.write_text(convert(page.read_text()))
    print(f"wrote {target}")

The script converts codeblock and code tags to fences, expands include_code files with the selected line range, drops raw tag lines, and copies only posts. It gives the fence extractor a representation of examples that were otherwise hidden behind supported tags.

Generate the copy and plan its scan:

python3 tools/hexo_scan_copy.py source scan-docs
docsalive scan . --docs-dir scan-docs

The recorded script output was:

wrote scan-docs/posts/install-acme.md

The copy contained one page and four blocks. When run, both Python blocks passed, the included JavaScript passed under Node 24, and the HTML block was skipped. The engine's default runner uses Node for supported JavaScript; the particular probe used Node 24.

This is a targeted conversion, not a Hexo renderer. It assumes the default source folder and code_dir rather than reading _config.yml. It handles only codeblock or code, include_code, and raw tags, with one tag per line. It does not render other tags, Nunjucks, or EJS. It skips pages outside _posts, and it ignores skip_render and exclude rules.

The copy also expands an include even when Hexo itself would render nothing, as in the observed Python-file case. Compare the generated copy with the built post when in doubt. Keep scan-docs/ outside source/ and regenerate it in CI so the scan uses the current post and included files. If the selected scan directory itself contains a docs/ subfolder, engine 0.6.3 narrows collection to that subfolder; this copy avoids that layout.

Test a real runtime failure

The following change is broken on purpose. It calls a method the array does not have:

-const first = Array.isArray(hosts) ? hosts[0] : hosts;
+const first = Array.isArray(hosts) ? hosts.first() : hosts;

Hexo still built the page. When the scan-ready copy was run, the JavaScript block failed with a TypeError and was classified as runtime-error, which needs review. That result supplies evidence a reader would hit a problem; it is not automatically filed as a confirmed docs bug by that category alone.

This example also shows why a build and an execution check complement each other. The build verifies the site-generation path under the tested configuration. The run exercises the included code after conversion. Neither result proves that the conversion perfectly mirrors every rendered page.

Triage and maintain the coverage

Finding Likely cause What to do
Draft fails as api-drift The root scan collected an unpublished draft Fix it before publication; distinguish it from current published coverage
Included code is absent from the report The source contains a tag rather than a fence Generate and scan a copy, then check the built page
Included code is absent from the page The tag did not resolve as expected Inspect the built post and the referenced file; do not rely on build status alone
JavaScript fails as runtime-error A call or prerequisite may be wrong Reproduce with the intended setup and decide whether the example or environment needs a change
HTML is skipped The fence is not executable Review the markup and rendered page separately
A run does not finish A block started a server or another long-running process, as the starter post's server command did Remove or rewrite that block for automated runs and test the server step separately
A result says pass for an unfamiliar label The label may have no checker Verify support before treating the result as execution evidence

An unknown fence label can be reported as passing without being run or parsed in engine 0.6.3. Treat that as a known engine limitation. Also review setup and dependencies: --setup runs a shell command before each page, while the default scan only plans. A finding can reflect a missing tool, fixture, or context rather than a defect in the published example.

Use this checklist in a review or CI issue:

[ ] List the posts and pages included in the intended Hexo build.
[ ] Decide whether drafts are in scope and label their findings accordingly.
[ ] Review scaffolds and starter posts before a root scan.
[ ] Inventory codeblock, include_code, and raw tags used by published posts.
[ ] Build the site and inspect included examples on the generated pages.
[ ] Generate the scan-ready copy outside source and review its coverage limits.
[ ] Run supported examples with the documented setup.
[ ] Review skipped, unsupported, timeout, and runtime-error findings.
[ ] Regenerate the copy and repeat checks when posts or included files change.

Where DocsAlive fits

DocsAlive can run supported fenced examples in page order, preserve page-level state, and classify results for review. It can help distinguish likely API drift from missing tools, context, credentials, and other causes. Its findings reference explains the categories, and the CLI reference describes scan options.

For Hexo, the scan-ready copy makes some tag-provided examples visible, but it does not establish rendered-site parity. Keep the Hexo build and rendered-page review alongside the scan. Every plan runs the scan on a schedule, and the Team plan and above add pull request checks and draft fix pull requests; pricing lists what each plan includes. To see a real report on a public repository you maintain, use the health check.

The same distinction applies to other documentation systems: pdoc examples can live in docstrings, while Doxygen examples can live in comments and snippet files. Each source format needs a coverage plan before a report can be interpreted.

The sources we checked

The following sources were read on November 14, 2026. Engine behavior was checked against engine 0.6.3 on the same day.

Source What it covers
Hexo writing Posts, pages, drafts, scaffolds, and renderer plugins for other formats
Hexo tag plugins Codeblock, include_code, and raw tags
Hexo configuration code_dir, skip_render, render_drafts, and include and exclude rules
Hexo setup Folder layout, scaffolds, and the underscore rule inside source
Hexo plugins Scripts in the scripts folder, loaded during initialization
Hexo commands Generation and draft-related commands
Python 3.10 changes Removal relevant to the draft example

FAQ

Does DocsAlive detect Hexo?

Engine 0.6.3 does not. It treats Hexo as plain Markdown, scans from the root when there is no top-level docs folder, collects drafts and scaffolds, and does not render tag plugins. Supported JavaScript fences run with Node; their output is not compared.

Why did an included example not appear in the scan?

The engine extracts fences from source text and does not expand an include_code tag. A scan-ready copy can expose the file contents as a fence, subject to the conversion script's stated limits.

Does a successful Hexo build prove an include appeared?

No. In the observed Python-file case, the build succeeded and copied the file, but the tag rendered nothing. Inspect the built post when an include changes or its resolution is uncertain.

Should drafts be tested?

Testing drafts can catch problems before publication. Label them as drafts in triage so a failure is not mistaken for a defect on the currently published site.

Why keep the conversion script outside scripts?

Hexo loads files in its top-level scripts folder during initialization. The Python conversion script caused a script-load error there in the probe, so the walkthrough keeps it in tools.

Is the scan-ready copy the rendered site?

No. It handles only the listed tags and assumes default paths. It skips other pages and rendering rules, so compare it with the built site and maintain separate checks for anything it cannot represent.

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