Handling Relative Paths, Internal Links, and Anchors

Feb 26, 2026 Local Context

Markdown documents rarely exist in isolation. AxelBase simulates a virtual project structure to validate internal references without requiring a live web server.

Simulating the Virtual File Tree

Relative paths like ../images/logo.png or ./setup.md are resolved against a Base Directory you specify. This allows the tool to verify structural integrity as if it were running inside your terminal.

Logic Preview:
Input: [Setup Guide](./docs/setup.md)
Virtual Base: /project/root
→ Resolved: /project/root/docs/setup.md

Cross-Document and Anchor Validation

The checker doesn't just look for files; it looks inside them for navigation markers. In-page anchors (e.g., #installation-steps) are validated by scanning the document for matching Heading IDs.

Anchor Awareness

Missing anchors appear as warnings with the exact line number of the linking text. This ensures your "Jump to Section" links never leave a reader stranded at the top of a page.

Simulating Deployment Environments

Working on a project for GitHub Pages or a custom domain? You can set a Virtual Base URL. This mimics how links will behave after deployment, ensuring your relative paths resolve correctly whether viewed locally or on the web.

Link TypeValidation MethodRequirement
External URLNetwork Request (Fetch)Internet Connection
Relative PathLogical Path ResolutionBase Directory Set
Internal AnchorDOM ID MatchingHeading with ID

Thank you for following this series—happy validating and keep your Markdown links trustworthy and private.