Skip to main content

Z105-absolute-path — Absolute Path

Z-Code: Z105 ABSOLUTE_PATH · Engine: standalone · Exit: 1

zenzic check links
docs/index.md:10:5
[Z105]'/guide' uses absolute path
8│ ## Navigation
9
10- [Guide](/guide)
^^^^^^
11
exit 1

The Fixture

The fixture lives in examples/z105-absolute-path/ in the Zenzic repository. It contains a single document:

FileRole
docs/index.mdSource — contains [Guide](/guide) at line 10
.zenzic.tomlEngine: standalone, fail_under = 0

docs/index.md links to /guide using an absolute path. Absolute paths are resolved from the server root: when a site is hosted under a subdirectory (e.g., https://example.com/my-docs/), the link /guide resolves to https://example.com/guide — not to https://example.com/my-docs/guide. This silent mis-resolution makes the documentation non-portable across hosting environments such as GitHub Pages project sites or CDN subdirectory deployments.

Running the Example

# Clone the Zenzic repository — no extra installation required
cd examples/z105-absolute-path
uvx zenzic check links

Expected output:

standalone - 1 file (1 docs, 0 assets) - 0.0s - 66 files/s

docs/index.md:10:2 x [Z105] '/guide' uses an absolute path — use a relative
path (e.g. '../' or './') instead; absolute paths break portability when the
site is hosted in a subdirectory

8 │ ## Absolute Path Link
9 │
10 ❱ - [Guide](/guide) — uses `/guide` (absolute) instead of `guide.md`
(relative) → **Z105**
│ ^^^^^^^^^^^^^^^
11 │
12 │ ## What Zenzic Reports

────────────────────────────────────────────────────────────────────────────────

Summary: x 1 error ! 0 warnings i 0 info - 1 file with findings

FAILED: Hard errors detected. Exit code 1 is mandatory.
Refer to https://zenzic.dev/docs/reference/finding-codes for remediation · Try
'zenzic check --help' for options.
[ Suppression Audit: 0/30 (inline: 0, per-file: 0)

Exit code: 1

Interpreting the Output

The Z105 finding indicates a ABSOLUTE_PATH issue.

This error or warning is raised by Zenzic when a link uses an absolute path (starting with / or pointing to a full system path) instead of a relative path. This violates portability constraints, as the documentation will fail to render correctly when deployed to different server subpaths or preview environments. In this specific example:

  • Scan Type: Link Validator
  • Severity: Error
  • Impact: Absolute paths reduce documentation portability, incurring a DQS deduction of 2.0 points.

Resolve the Issue

Exit code 1. Replace the root-relative path link with a document-relative path link (e.g., use ../guide/setup.md instead of /guide/setup.md).

See Also