On this page
The short answerHow a Fumadocs site holds examplesWhy Fumadocs examples driftClassify the visible examplesWhat the raw scan seesPrepare a scan-ready copyTriage findingsKeep generated choices honestWhere DocsAlive fitsThe sources we checkedFAQThe short answer
Build the Fumadocs site and test the commands and files that its rendered tabs expose. Engine 0.6.3 treats Fumadocs as plain Markdown, so use the content directory explicitly and review what the scan actually extracts. In particular, an npm fence can be reported as passing without being run: that is an engine limitation. A reviewed scan-ready copy can turn the demonstrated constructs into testable fences.
Fumadocs can present more choices than appear in the source. Remark NPM can turn one written install command into four package-manager tabs, while separate tab metadata can group examples for readers. Included files can change independently of the page. A reliable workflow checks the built site, the underlying files and the coverage of each displayed alternative.
The examples below use the verified Fumadocs setup and engine 0.6.3. See the static-site guide for the general approach and the related guides for Jekyll and Antora for other rendering models.
How a Fumadocs site holds examples
In this layout, content lives under content/docs as MDX. Front matter supplies page metadata, meta.json controls page order, and fences can carry titles or tab metadata. A Tabs component is another way to present alternatives. Remark NPM transforms an npm fence into package-manager choices; package-install fences provide another install-oriented form. Include tags can insert source files, and Shiki highlights code during the build.
Create the illustrative app with the following command:
npx --yes create-fumadocs-app@16.3.2 example-docs --template +next+fuma-docs-mdx --pm npm --no-git --install -y
The illustrative MDX component mapping makes the Tabs components available to pages.
import defaultMdxComponents from 'fumadocs-ui/mdx';
import * as TabsComponents from 'fumadocs-ui/components/tabs';
import type { MDXComponents } from 'mdx/types';
export function getMDXComponents(components?: MDXComponents) {
return {
...defaultMdxComponents,
...TabsComponents,
...components,
} satisfies MDXComponents;
}
export const useMDXComponents = getMDXComponents;
declare global {
type MDXProvidedComponents = ReturnType<typeof getMDXComponents>;
}
The illustrative global configuration maps the pycon label to the Python grammar. In this verified setup the TypeScript check also required themes alongside the alias.
import { defineConfig } from 'fumadocs-mdx/config';
export default defineConfig({
mdxOptions: {
rehypeCodeOptions: {
themes: { light: 'github-light', dark: 'github-dark' },
langAlias: { pycon: 'python' },
},
},
});
This illustrative metadata file orders the pages:
{
"title": "Docs",
"pages": ["index", "getting-started", "test"]
}
The illustrative page below contains an install fence, component tabs, metadata-based tabs, an include and an interpreter session. The build rendered the install fence as four package-manager choices and rendered the included file as a code block.
---
title: Getting started
description: Check the tools, install the client and run a first example.
---
Install the client package:
```npm
npm i semver
```
Check the package manager:
<Tabs items={['npm', 'yarn']}>
<Tab value="npm">
```bash
npm --version
```
</Tab>
<Tab value="yarn">
```bash
yarn --version
```
</Tab>
</Tabs>
Check the Python installer:
```bash tab="pip"
python3 -m pip --version
```
```bash tab="pipx"
pipx --version
```
The same calculation in two languages:
```python tab="Python"
print(sum([1, 2, 3]))
```
```js tab="JavaScript"
console.log([1, 2, 3].reduce((a, b) => a + b, 0));
```
The settings example comes from a file in this folder:
<include>./settings.py</include>
A quick check in the interpreter:
```pycon
>>> sum([1, 2, 3])
6
```
The illustrative included file can change without an edit to the page. Test it directly as a real file as well as checking the page that displays it.
import json
settings = {"retries": 3, "timeout": 10}
print(json.dumps(settings, sort_keys=True))
Build the site with the illustrative command below. With the alias configuration above, the verified build succeeded.
npm run build
The following diagnostic shows the build broken on purpose by omitting that configuration. A build failure for a pycon label can encourage authors to avoid the label, losing a useful way to check a Python interpreter session.
ShikiError: Language `pycon` not found, you may need to load it first
The Fumadocs Markdown documentation, Tabs documentation, Remark NPM documentation, and include documentation describe these authoring features.
Why Fumadocs examples drift
Fumadocs makes it easy to show readers more than the author wrote. That is good for readers and hard for testing, because the extra material is generated at build time and never appears in the source that most checks read.
One install command becomes four. Remark NPM takes a single npm command and shows npm, pnpm, yarn and bun versions of it. The author wrote and probably ran one of them. The other three are translations. They are usually right, but flags, workspace options and scripts do not always translate one-to-one, and nobody sees the generated variants until a reader picks one.
Tab variants are edited one at a time. When a page shows pip and pipx tabs, or Python and JavaScript tabs, an update to one variant is easy to forget in the others. Review tends to look at the first tab, so a renamed package or a new required argument can land in one tab while the other keeps the old form for months.
Included files change outside the page diff. An include tag shows a real file, which keeps the example close to code that may be tested elsewhere. It also means that a change to that file changes the page without touching it. If the file is not tested on its own, a broken edit reaches readers through every page that includes it.
A build error pushes authors away from checkable formats. In our test, a pycon fence failed the whole build until the language was mapped to the Python grammar. An author who meets that error under deadline pressure will often relabel the session as plain text or python and move on. The page then looks the same, but the printed output is no longer something a test can compare.
Components hide code from fence-based tools. A custom component can render code from props, imports or data files. That code never appears as a fence, so it is invisible to any tool that reads fences, including the engine. Keep an inventory of components that render runnable code so they are tested another way.
The result is a site where the source, the build and the reader's view can disagree. A good workflow checks each of them deliberately.
Classify the visible examples
| Kind | Appropriate check |
|---|---|
| Shell or language fence | Run a complete example with the documented setup. |
| Generated install tabs | Test each package-manager path that readers can choose. |
| Component or metadata tabs | Identify alternatives and record which variants ran. |
| Included file | Test the file directly and verify the displayed content. |
| Configuration | Parse and validate it with the relevant tool. |
| Output or fragment | Review its purpose and make omissions clear to readers. |
Tab variants can drift independently. A preferred tab passing does not establish that another package manager is installed or that its displayed command works. Likewise, a Python tab and a JavaScript tab may implement the same idea but still need their own tests.
What the raw scan sees
The following command plans a scan of the content folder. It does not execute blocks without the execution flag.
docsalive scan . --docs-dir content/docs
In the verified repository, DocsAlive treated the content as plain Markdown and added the root README, for four pages. When executed, the npm fence was reported as passing without running anything, even when the package name was deliberately nonexistent. Unknown fence labels have no runner in this engine version and can receive a pass without execution or parsing. This is an engine limitation.
The Tabs component was grouped: the npm variant ran and the yarn alternative was skipped. The tab= fences were not grouped, so both installer commands ran and the pipx command failed as missing-tool. The Python and JavaScript examples both ran and passed. The include was not seen because it was not a fence. The pycon session passed after the build accepted its label.
| Fumadocs construct | What Fumadocs renders | What the engine does in 0.6.3 |
|---|---|---|
npm fence |
Four package-manager tabs in the verified build | Reports a pass without running or checking it. |
| Package-install fence | An install-oriented presentation | Its unknown label can pass without execution or parsing. |
| Tabs component | Selectable alternatives | Groups recognized component tabs and selects a variant. |
| Fence tab metadata | A tab set in the verified build | Does not group those fences by their metadata. |
| Python and JavaScript tabs | Alternative language examples | Both ran in the verified raw scan. |
| Include tag | Code from the included file | Does not extract the include itself. |
| Pycon fence | A highlighted interpreter session once the grammar alias is configured | Executes the session and compares its printed output. |
| Shiki highlighting | Formatted code | Is part of the site build, not proof that code ran. |
The engine compares printed output only in Python pycon or python-repl sessions. A separate output block is skipped; it is not validated. Keep a separate check for any other output promise that matters to the reader.
Prepare a scan-ready copy
The following illustrative script was verified for the demonstrated layout. It converts install-oriented fences, wraps consecutive metadata tabs in recognized component markup, and inserts supported whole-file includes.
"""Write a scan-ready copy of a Fumadocs content folder.
- npm fences become bash fences, and package-install fences become
npm install commands, so the commands are run instead of skipped;
- runs of fences that carry tab="..." are wrapped in <Tabs>/<Tab> so the
scanner treats them as one tab group;
- <include>./file</include> and ::include[./file] become fenced blocks
holding the file, so included code is tested with the page.
Includes with a #region are reported and left for a direct test.
"""
import re
import sys
from pathlib import Path
src = Path(sys.argv[1] if len(sys.argv) > 1 else "content/docs")
out = Path(sys.argv[2] if len(sys.argv) > 2 else "scan-docs")
LANGS = {".py": "python", ".js": "js", ".mjs": "js", ".ts": "ts", ".sh": "bash", ".json": "json", ".toml": "toml"}
INCLUDE = re.compile(r"^\s*(?:<include>(.+?)</include>|::include\[(.+?)\])\s*$")
FENCE = re.compile(r"^(`{3,})(\S*)(.*)$")
problems = 0
def convert(page):
global problems
lines, result, i = page.read_text().splitlines(), [], 0
while i < len(lines):
m = FENCE.match(lines[i])
inc = INCLUDE.match(lines[i])
if inc:
target = (inc.group(1) or inc.group(2)).strip()
path = (page.parent / target.split("#")[0]).resolve()
if "#" in target or not path.exists() or path.suffix not in LANGS:
print(f"{page}:{i + 1}: include not resolved, test {target} directly")
problems += 1
result.append(lines[i])
else:
result += [f"```{LANGS[path.suffix]}", path.read_text().rstrip("\n"), "```"]
i += 1
continue
if not m:
result.append(lines[i])
i += 1
continue
group = []
while m and 'tab="' in m.group(3):
end = next(j for j in range(i + 1, len(lines)) if lines[j].strip() == m.group(1))
group.append((re.search(r'tab="([^"]+)"', m.group(3)).group(1), lines[i:end + 1]))
i = end + 1
while i < len(lines) and not lines[i].strip():
i += 1
m = FENCE.match(lines[i]) if i < len(lines) else None
if group:
result.append("<Tabs>")
for label, block in group:
result += [f'<Tab value="{label}">', *block, "</Tab>"]
result += ["</Tabs>", ""]
continue
end = next(j for j in range(i + 1, len(lines)) if lines[j].strip() == m.group(1))
body = lines[i + 1:end]
if m.group(2) == "npm":
result += ["```bash", *body, "```"]
elif m.group(2) == "package-install":
result += ["```bash", *[f"npm install {b.strip()}" for b in body if b.strip()], "```"]
else:
result += lines[i:end + 1]
i = end + 1
return "\n".join(result) + "\n"
for page in sorted(src.rglob("*.md*")):
dest = out / page.relative_to(src)
dest.parent.mkdir(parents=True, exist_ok=True)
dest.write_text(convert(page))
print(f"wrote {dest}")
sys.exit(1 if problems else 0)
Create the copy and plan a scan of it:
python3 scripts/fumadocs_scan_copy.py content/docs scan-docs
docsalive scan . --docs-dir scan-docs
The verified preparation run wrote these files:
wrote scan-docs/getting-started.mdx
wrote scan-docs/index.mdx
wrote scan-docs/test.mdx
The copy produced four scanned pages, including the root README, and eleven blocks. When executed, the npm command actually ran and passed; pip ran while pipx was skipped as an alternative; Python and JavaScript passed; the included file ran; and the pycon session passed.
The script reports region includes for direct testing and exits with a failure status. It does not evaluate arbitrary MDX expressions or components beyond the patterns described. Review generated content against the built page, especially when a tab set or include differs from the demonstrated form. Findings refer to the generated copy, so trace them back to the source page or included file.
Triage findings
| Finding | What to check next |
|---|---|
| Green install fence in the raw scan | Confirm whether the label had a runner; test the command through the reviewed copy or separately. |
| Missing-tool for a tab | Decide whether the tool is a documented prerequisite and test that alternative in a suitable environment. |
| Included code absent from the report | Test the underlying file and use a supported whole-file copy where appropriate. |
| Pycon build failure | Check the Shiki language alias and rebuild before scanning. |
| One tab passes | Record which alternatives remain untested. |
| Unresolved region include | Test the selected region directly and inspect its setup. |
For install examples, distinguish the source command from the variants generated for readers. A scan of one command is evidence for that command under the chosen environment. It does not prove that every generated package-manager path works. Commands needing network access also need an environment that permits it; a network-disabled run can skip them.
Use this checklist in a review:
[ ] Build the site and inspect changed pages and tab sets.
[ ] Check generated package-manager commands separately.
[ ] Test included files directly and review selected regions.
[ ] Configure highlighting for interpreter sessions used by the site.
[ ] Create a fresh scan-ready copy and inspect its transformations.
[ ] Plan and execute supported blocks with documented setup.
[ ] Record skipped tab alternatives and test important variants separately.
[ ] Trace findings in the copy to the original source before editing.
Keep generated choices honest
Most of the work in testing a Fumadocs site is deciding which of the choices a reader sees you will actually stand behind.
Start with install commands. Decide whether every generated package-manager tab is supported. If it is, test at least one representative command for each manager in an environment where that manager is installed, because the engine runs one variant from a group and skips the alternatives. If some managers are not supported, say so on the page or limit the generated tabs, rather than showing commands nobody has run.
For tab groups written with tab metadata, keep the variants parallel. A short review rule helps: when one tab changes, every tab in the group is reviewed in the same pull request. The scan-ready copy wraps those runs in recognized tab markup so the engine treats them as alternatives, which removes false missing-tool failures but also means only one variant runs. Record which one.
For includes, test the underlying files as code. A whole-file include can be inlined into the copy so the page-level example runs in context; a region include needs a direct test of the region, because the copy script reports it instead of guessing. In both cases, the included file should have its own test in the repository, since that is where people edit it.
For interpreter sessions, keep the language alias in the site configuration so authors can use pycon without breaking the build. Sessions are the one place where printed output is compared, which makes them worth protecting.
Finally, build before scanning. A Fumadocs build catches MDX syntax errors, missing components and highlighting problems that a scan does not report. Run the build, then the copy script, then the planned scan, then the execution, and keep each step's output so a failure can be traced back to the right layer. The JavaScript docs testing guide, the Nextra guide and the GitHub Actions guide cover related MDX and CI patterns.
Where DocsAlive fits
Use DocsAlive on the reviewed Markdown copy to execute supported examples in page order and classify findings. Its fresh page containers help expose missing setup, while triage separates likely documentation bugs from cases such as missing tools and credentials. See framework coverage, the CLI reference and findings.
Keep the Fumadocs build, direct included-file tests and alternative package-manager tests alongside the scan. The copy does not evaluate arbitrary components, and a passing status must be interpreted in light of the engine’s label support. The one-off health check provides a report for an eligible public repository, with those same coverage limits in mind. Plans and limits are on the pricing page; the Open source plan is $0 per month for a public OSI-licensed repository.
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 |
|---|---|
| Fumadocs for Next.js | Site setup |
| Fumadocs Markdown | MDX authoring and code blocks |
| Tabs component | Component-based tabs |
| Remark NPM | Package-manager presentation |
| MDX includes | Including source files |
| Global MDX options | Shared configuration |
| Code highlighting | Highlighting options |
FAQ
Does DocsAlive detect Fumadocs automatically?
Engine 0.6.3 treats the repository as plain Markdown. Point the scan at content/docs and review the added root README and the resulting coverage.
Does a passing npm fence mean the install ran?
No. In engine 0.6.3 the unknown npm label can be reported as passing without execution or parsing. This is an engine limitation.
Are all Fumadocs tabs grouped?
The recognized Tabs component was grouped in the verified scan. Fences grouped by tab metadata were not grouped until the preparation script wrapped them.
Does a scan test an included file automatically?
The raw include tag was not extracted in the verified scan. Test the file directly or use a reviewed copy that inserts a supported whole-file include.
Why configure a pycon language alias?
In the verified build, Shiki did not recognize the pycon label until it was mapped to the Python grammar. The alias allowed the site build to accept that session.
Does one passing package-manager tab cover the others?
No. Record the variant that ran and test other reader-visible alternatives in suitable environments.




