On this page
The short answerHow Docusaurus keeps versionsWhy versioned examples driftChoose the versions to testSee what the engine collectsCheck the version inventoryTriage an old-version failurePut the check into the release workflowWhere DocsAlive fitsThe sources we checkedFAQThe short answer
Test each Docusaurus version that your team still expects readers to use, including the latest release, supported older releases, and the current unreleased documentation. In engine 0.6.3, a default DocsAlive scan covers only docs/, which is Next by default; it skips versioned_docs, including the release readers normally see first. An include glob cannot reach that skipped folder. Scan each release with --docs-dir, then review the extra root README and the reported framework. This is an engine limitation, not a Docusaurus bug.
Docusaurus versioning preserves a copy of your documentation at a release point. That is useful for readers who have not upgraded, but it also preserves mistakes and assumptions from that point in time. A later correction in docs/ does not automatically repair an older copy. Meanwhile, a language runtime, dependency, installation path, or API can change around an example that has remained untouched.
A documentation build and an example test answer different questions. A build can confirm that Docusaurus can produce the site; it does not establish that every command or code sample works in the environment readers will use. Treat version coverage as an explicit release decision and keep a record of what was actually run.
The walkthrough below uses a small site to make those boundaries visible. The files and version names are illustrative, and the intentionally outdated import demonstrates a real runtime change. The commands and results were checked with Docusaurus 3.10.2 and engine 0.6.3.
How Docusaurus keeps versions
By default, docs/ holds the current documentation, labeled Next and served under /docs/next/ once versioned documentation is present. Running the version command copies that directory into a named folder under versioned_docs/, writes a corresponding file under versioned_sidebars/, and records the version in versions.json.
The first entry in versions.json is the latest version. By default, that is the version readers see at the unversioned documentation path. Older versions can remain published at version-specific paths with a banner indicating that they are no longer actively maintained. The exact content and support promise are still yours to manage. See the Docusaurus versioning guide and CLI reference.
The docs plugin exposes settings that affect the built site. lastVersion defaults to the first entry in versions.json and selects the version shown by default. includeCurrentVersion defaults to true. onlyIncludeVersions limits which versions are built; the versioning guide suggests limiting development and deploy previews to two or three versions. These options do not change what engine 0.6.3 scans. The engine does not read those version settings, versions.json, or the versioned sidebar files. See the docs plugin reference.
Create a small versioned site
Start with a site created from the classic template. In the checked project, the template tutorial folders were removed afterward so that docs/ contained only the two files shown next. The creation command resolved to Docusaurus 3.10.2 in that run.
npx --yes create-docusaurus@latest dsite classic --javascript --package-manager npm --skip-install
cd dsite && npm install
The illustrative docs/intro.mdx below is the 1.0 source. Its import of Mapping is outdated on purpose: Python 3.10 removed the deprecated collection aliases from collections. The page also imports a partial and presents two different-language tabs.
---
sidebar_position: 1
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import Install from './_install.mdx';
# Getting started
<Install />
Check that the defaults are a mapping:
```python title="check_defaults.py"
from collections import Mapping
defaults = {"retries": 3, "timeout": 10}
print(isinstance(defaults, Mapping))
```
Serialize the defaults:
```pycon
>>> import json
>>> json.dumps({"retries": 3, "timeout": 10}, sort_keys=True)
'{"retries": 3, "timeout": 10}'
```
<Tabs groupId="runtime">
<TabItem value="python" label="Python" default>
```python
print(sorted({"timeout": 10, "retries": 3}))
```
</TabItem>
<TabItem value="node" label="Node.js">
```js
console.log(Object.keys({ timeout: 10, retries: 3 }).sort());
```
</TabItem>
</Tabs>
The illustrative docs/_install.mdx is the imported partial. Docusaurus excludes underscore-prefixed files from pages by default; in the checked build there was no separate route for this file.
Check your Python version first:
```bash
python3 --version
```
Cut the 1.0 version from the files as they stand. The command creates the versioned copy, sidebar file, and version list entry.
npm run docusaurus docs:version 1.0
The checked command completed successfully and ended with this line:
[SUCCESS] [docs]: version 1.0 created!
Now correct the import in docs/intro.mdx only. This illustrative change repairs Next, while the 1.0 copy keeps the old import.
-from collections import Mapping
+from collections.abc import Mapping
Build the site after the correction:
npm run build
The build succeeded. With only 1.0 cut, /docs/intro/ served the 1.0 copy containing the old import. The fixed page was at /docs/next/intro/ under an unreleased-documentation banner. A successful build therefore did not establish that the default page's Python example would run.
After cutting 2.0 from the fixed docs/, the illustrative versions.json contained the newest version first:
[
"2.0",
"1.0"
]
In that build, 2.0 appeared at /docs/intro/, 1.0 remained at /docs/1.0/intro/ with a no-longer-maintained banner, and Next remained at /docs/next/intro/. A banner tells readers about maintenance status; it does not test or repair the example.
The version command also wrote this illustrative sidebar file for 1.0:
{
"tutorialSidebar": [
{
"type": "autogenerated",
"dirName": "."
}
]
}
The sidebar helps Docusaurus construct navigation for the frozen copy. It is also a useful item to check for presence when auditing a release, but its existence alone says nothing about whether the page's examples work.
Why versioned examples drift
A version copy can remain unchanged while the environment around it moves. A reader may run an old import with a newer Python interpreter, install a dependency whose current release has removed an API, or follow a command whose prerequisite has changed. In the example above, Python's 3.10 release notes explain the removal behind the failure; the engine's runner image uses Python 3.12.
Fixes also tend to land where maintainers are already working: docs/. That is appropriate for the next release, but it leaves each frozen version to be considered separately. A fix may be applicable to several copies, only one copy, or none of them if the older product actually behaves differently.
Partials add another version boundary. When a version is cut, the partial is copied with the rest of docs/. Editing the current partial does not update the copied ones. A reader sees the partial inside the page, but a scanner may treat the underlying files differently. That distinction matters when an example depends on setup established by the surrounding page.
Finally, old versions can remain visible long after their release checks have stopped running. Decide which copies are still promises to readers and give them a testing schedule. If a version is no longer supported, decide whether to keep it available with clear context or retire it. A banner and a green site build are not substitutes for that decision.
Choose the versions to test
The team owns the support decision. A practical classification is:
| Version class | Why test it | What to decide |
|---|---|---|
| Latest released version | It is normally the default landing version and represents the current released product. | Which runtime and released artifact reflect the reader's path? |
| Still-supported older versions | Readers may deliberately select these copies and rely on their instructions. | Which releases remain supported, and which environments should each use? |
| Next | It catches problems before the next documentation release. | Which unreleased product state and prerequisites should the examples use? |
| Retired or unsupported versions | They may still be published and found through search. | Whether to keep, label, repair, or retire each copy. |
Do not assume that all versions should run against the same package build. A release-specific example may need the artifact for that release, while Next may need a development build. Record the setup and dependencies for each run so a failure can be interpreted against the version the page actually describes.
For a broader approach to current documentation, see testing Docusaurus docs. The Read the Docs guide covers a different version model based on Git tags and branches.
See what the engine collects
The following command plans the default scan. Add execution when you want the planned examples run, as described in the CLI reference.
docsalive scan .
In the checked project, the engine detected Docusaurus and collected two pages from docs/, containing five blocks. It did not collect any release copy under versioned_docs. When executed, all five blocks passed, including both different-language tabs. That result describes Next in this project; it does not cover the broken 1.0 page that readers could still visit.
The engine scans the partial as its own page. Its shell block passed there, rather than running inside the page that imports it. The component tag in the introduction is not expanded. If the partial needs variables or files from the importing page, test the assembled reader journey separately.
An include filter cannot make a skipped folder eligible. This illustrative attempt collected zero pages:
docsalive scan . --include "versioned_docs/*"
Use the version directory as the scan's documentation directory instead:
docsalive scan . --docs-dir versioned_docs/version-1.0
For the checked 1.0 copy, the engine reported the framework as plain and collected three pages: the two version files plus the root README. It found five blocks. On execution, the old import failed as api-drift; the partial's shell block, the pycon session, and both language tabs passed. The same import in the corrected docs/ copy passed.
The distinction between planning and execution matters. A planning command identifies what would be handled; it is not evidence that examples ran. Review page counts and paths before relying on a result, and use the CLI's execution option for a run intended to test them.
Read the report in context
A failure category is a starting point for investigation. In this case, the removed import is a documentation problem when the page is meant to work on the tested runtime. A timeout or missing fixture can instead need review of the environment and page prerequisites. The findings reference explains the categories.
Only pycon sessions have their printed output compared by the engine. A difference is a warning categorized as output-differs; assess whether it represents a meaningful reader-facing problem. An output block is skipped, not validated. Also inspect skips and unsupported cases before treating a green summary as complete coverage.
One known limitation deserves special attention: an unknown fence label can be reported as passing without the block being run or parsed. Check the languages and reasons in the report, and use another suitable test for a format the engine does not handle.
| Docusaurus versioning item | What Docusaurus does | What the engine does in 0.6.3 |
|---|---|---|
docs/ |
Holds current documentation, labeled Next by default. | Detects Docusaurus and collects its Markdown and MDX pages from docs/ by default. |
versioned_docs/ |
Stores copied release pages. | Skips this folder during ordinary collection; an include filter cannot add it back. |
A version directory selected with --docs-dir |
Contains the frozen pages for that version. | Scans the selected directory as plain, adding the root README as an extra page. |
versions.json |
Lists versions, newest first; its first entry is the default lastVersion. |
Does not read it to choose scan targets. |
| Versioned sidebar files | Preserve navigation information for each version. | Does not read them to determine example coverage. |
| Underscore-prefixed partial | Is excluded as a standalone page by default and can be imported into a page. | Scans the file as its own page; it does not expand the imported component. |
| Different-language tabs | Present alternatives to a reader. | Both ran in the checked component; only same-language variants are treated as alternatives. |
| Site version settings | Control which versions are built or shown. | Does not use those settings to change collection. |
These observations apply to the checked engine release. They are not guarantees about every Docusaurus configuration or a substitute for inspecting the page list in your own report.
Check the version inventory
A small inventory check can catch a missing folder or sidebar before a scan is scheduled. The following illustrative scripts/check_versions.py reads the version list, checks those two items for each entry, and prints a scan command. It does not run the scans or validate the content.
import json
import sys
from pathlib import Path
root = Path(".")
versions = json.loads((root / "versions.json").read_text())
missing = 0
for v in versions:
docs = root / "versioned_docs" / f"version-{v}"
sidebar = root / "versioned_sidebars" / f"version-{v}-sidebars.json"
pages = sorted(p for p in docs.rglob("*") if p.suffix in {".md", ".mdx"}) if docs.is_dir() else []
if not docs.is_dir() or not sidebar.is_file():
print(f"version {v}: missing {docs if not docs.is_dir() else sidebar}")
missing += 1
continue
print(f"version {v}: {len(pages)} pages -> docsalive scan . --docs-dir {docs}")
print("current (Next): docs/ -> docsalive scan .")
sys.exit(1 if missing else 0)
Run the inventory from the repository root:
python3 scripts/check_versions.py
For the two-version probe, it completed successfully and produced this illustrative inventory:
version 2.0: 2 pages -> docsalive scan . --docs-dir versioned_docs/version-2.0
version 1.0: 2 pages -> docsalive scan . --docs-dir versioned_docs/version-1.0
current (Next): docs/ -> docsalive scan .
The next result is broken on purpose: the version list names 2.1, but its documentation folder is absent. The check exited with a failure. It does not tell you why the folder is missing or whether the other versions' examples pass.
version 2.1: missing versioned_docs/version-2.1
version 2.0: 2 pages -> docsalive scan . --docs-dir versioned_docs/version-2.0
version 1.0: 2 pages -> docsalive scan . --docs-dir versioned_docs/version-1.0
current (Next): docs/ -> docsalive scan .
The following illustrative loop invokes a scan for every listed release. In the checked run it exited successfully, and each scan reported three pages because the root README was added each time.
for v in $(node -p "require('./versions.json').join(' ')"); do
docsalive scan . --docs-dir "versioned_docs/version-$v"
done
This loop plans scans as written; it does not execute their examples. It also does not scan Next, select a support subset, set release-specific dependencies, or prove that all commands succeeded independently merely from the loop's final status. Version names must be suitable for the shell splitting used here. Adapt the orchestration to your repository, inspect each report, and run the current documentation separately. The inventory script counts .md and .mdx files, whereas the engine also recognizes .markdown pages, so its count is not a complete engine coverage measure.
Triage an old-version failure
A finding in a frozen copy needs a version-specific decision. The same textual change is not necessarily correct for every release. Confirm the page's intended product version, reproduce the failure with an appropriate environment, and identify whether the reader can still reach the page.
| Finding | Possible team decision | Check before acting |
|---|---|---|
| The example is wrong for the old version's supported environment. | Fix the version copy. | Verify the correction against that version's behavior and review the page around it. |
| A correction applies to several supported releases. | Backport the fix to the relevant copies. | Test each copy with its own setup; do not assume identical text means identical behavior. |
| The version is no longer supported and should not remain available. | Retire the version under the team's publishing policy. | Account for existing links and communicate the support decision. |
| The failure depends on a newer runtime than the version supports. | Clarify prerequisites or decide whether to add support. | Compare the tested runtime with the page's actual promise. |
| The report shows a missing fixture or other uncertain result. | Investigate before changing the page. | Determine whether the fixture is documented, supplied by the test, or genuinely absent. |
These are team decisions. Keep the reason with the change so a future maintainer can distinguish a deliberate historical constraint from an overlooked bug.
Put the check into the release workflow
Run the inventory when version metadata changes. Test Next during normal documentation work, test the release copy as part of a release process, and schedule checks for supported older copies when their dependencies or runtimes can drift. A post-release run against a shipped artifact can detect a publication problem, but it cannot block a release that has already occurred.
Use a fresh environment that matches the documented prerequisites. Record any setup supplied by the test, and do not let a helper silently install something the reader was supposed to install. For long tutorials, also follow the complete path across pages: a page-level run does not prove that a reader can carry state through a multi-page journey.
This checklist can be pasted into a release issue:
[ ] List the latest release, supported older versions, and Next.
[ ] Record the owner and support decision for each published version.
[ ] Check each listed version has its documentation folder and sidebar.
[ ] Select the intended runtime and product artifact for each version.
[ ] Plan and execute a separate scan for each selected release directory.
[ ] Scan Next separately and inspect the collected page paths.
[ ] Account for the root README added to each release-directory scan.
[ ] Review partials, tabs, skips, unknown labels, and cross-page journeys.
[ ] Triage findings and decide where fixes or backports belong.
[ ] Record any version retired and the handling of existing links.
[ ] Save reports and schedule the next check for supported versions.
Where DocsAlive fits
DocsAlive runs supported documentation examples in isolated page environments and sorts results into findings that help distinguish likely documentation bugs from noise. Its report includes page and line information, status, category, and reasons. Review the collected pages and skipped blocks alongside failures; a report is evidence about the material actually handled, not every promise on the site.
For versioned Docusaurus documentation in engine 0.6.3, explicitly target each release directory and separately scan Next. Keep the version inventory and support policy in your own workflow, because the engine does not infer them from Docusaurus settings. See how documentation testing works, the framework reference, and the documentation testing checklist.
The sources we checked
These sources were read on November 13, 2026. Engine behavior was checked against engine 0.6.3 on the same day.
| Source | What it covers |
|---|---|
| Docusaurus versioning | Creating, publishing, and navigating documentation versions |
| Docusaurus docs plugin reference | Version settings and default page exclusions |
| Docusaurus CLI | The documentation version command |
| What's New in Python 3.10 | Removal of deprecated collection aliases |
FAQ
Does a default DocsAlive scan test released Docusaurus versions?
No. In engine 0.6.3 it scans only docs/, the unreleased Next version by default, and skips versioned_docs. An include glob cannot reach that skipped folder. Use --docs-dir for each release copy; the scan reports plain and also adds the root README.
Why can the default documentation page contain an old example?
The first entry in versions.json is the latest release and is shown by default under the standard settings. A correction made later in docs/ changes Next, but it does not automatically change the released copy.
Which old versions should we test?
The team should decide which versions remain supported and what readers can expect from them. Test the latest release and each supported older version against appropriate environments, and make a deliberate decision about copies that are no longer supported.
Does the engine test an imported partial inside its page?
In the checked project it scanned the underscore-prefixed partial as its own page and did not expand the imported component in the introduction. Test any setup or state shared between the partial and its surrounding page separately.
Do both tabs in a Docusaurus component run?
In the checked component, the Python and JavaScript tabs both ran because they used different languages. The engine treats same-language variants as alternatives, so inspect the report and arrange additional coverage where needed.
Does a successful site build prove examples work?
No. The checked site built successfully while its 1.0 copy retained an import that failed on the engine's Python runtime. Build the site and test the examples as separate checks, then review the version and environment associated with each result.




