On this page
The 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 checkedFAQThe 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.




