-
Notifications
You must be signed in to change notification settings - Fork 281
[BUG] Broken relative links across docs #2168
Copy link
Copy link
Closed
Labels
area/docs-sitedocs/src/content (Starlight), README, doc generation.docs/src/content (Starlight), README, doc generation.priority/highShips in current or next milestoneShips in current or next milestonestatus/acceptedDirection approved, safe to start work.Direction approved, safe to start work.status/triagedInitial agentic triage complete; pending maintainer ratification (silence = approval).Initial agentic triage complete; pending maintainer ratification (silence = approval).theme/governanceGoverned by policy. apm-policy, audit, enforcement, enterprise rollout.Governed by policy. apm-policy, audit, enforcement, enterprise rollout.type/bugSomething does not work as documented.Something does not work as documented.
Description
Metadata
Metadata
Assignees
Labels
area/docs-sitedocs/src/content (Starlight), README, doc generation.docs/src/content (Starlight), README, doc generation.priority/highShips in current or next milestoneShips in current or next milestonestatus/acceptedDirection approved, safe to start work.Direction approved, safe to start work.status/triagedInitial agentic triage complete; pending maintainer ratification (silence = approval).Initial agentic triage complete; pending maintainer ratification (silence = approval).theme/governanceGoverned by policy. apm-policy, audit, enforcement, enterprise rollout.Governed by policy. apm-policy, audit, enforcement, enterprise rollout.type/bugSomething does not work as documented.Something does not work as documented.
Type
Fields
No fields configured for issues without a type.
Projects
StatusShow more project fields
Done
Describe the bug
The docs site has widespread broken internal links caused by incorrect relative path depth. Astro/Starlight renders each markdown file as a directory-style URL (e.g.
enterprise/apm-policy.mdserves at/apm/enterprise/apm-policy/), so relative links resolve one level deeper than the source file's filesystem directory. Many links were written with too few../segments.Examples:
./governance-guide/on/apm/enterprise/apm-policy/resolves to/apm/enterprise/apm-policy/governance-guide/(404) — should be../governance-guide/../reference/targets-matrix/on/apm/integrations/ide-tool-integration/resolves to/apm/integrations/reference/targets-matrix/(404) — should be../../reference/targets-matrix/Scale
A link checker script against the source markdown found:
../reference/,../enterprise/,../consumer/, etc.) and same-section sibling links (./sibling-page/)Root cause
Every
.mdfile atsection/page.mdrenders at/section/page/, adding an extra URL segment../sibling/from there resolves as/section/page/sibling/(wrong) instead of/section/sibling/(correct). The same off-by-one applies to all deeper../chains.Why the build doesn't catch it
The
starlight-links-validatorplugin is configured witherrorOnRelativeLinks: false, which skips validation of relative links entirely. It only validates absolute internal links (starting with/).To reproduce
Affected files (54 total)
Full file list with broken link counts
consumer/deploy-a-bundle.mdconsumer/drift-and-secure-by-default.mdconsumer/governance-on-the-consumer-ramp.mdconsumer/update-and-refresh.mdxenterprise/adoption-playbook.mdenterprise/apm-policy.mdenterprise/drift-detection.mdenterprise/enforce-in-ci.mdenterprise/github-rulesets.mdenterprise/governance-guide.mdenterprise/lifecycle-scripts.mdenterprise/making-the-case.mdenterprise/policy-pilot.mdenterprise/policy-reference.mdenterprise/registry-proxy.mdenterprise/security.mdgetting-started/authentication.mdgetting-started/first-package.mdgetting-started/installation.mdgetting-started/migration.mdguides/registries.mdintegrations/ide-tool-integration.mdproducer/author-primitives/hooks-and-commands.mdproducer/author-primitives/instructions-and-agents.mdproducer/author-primitives/mcp-as-primitive.mdproducer/author-primitives/prompts.mdproducer/author-primitives/skills.mdproducer/compile.mdproducer/pack-a-bundle.mdproducer/package-relative-links.mdproducer/preview-and-validate.mdproducer/publish-to-a-marketplace.mdproducer/releasing-from-any-ci.mdproducer/repo-shapes.mdproducer/versioning-strategies.mdreference/baseline-checks.mdreference/cli/approve.mdreference/cli/pack.mdreference/environment-variables.mdreference/examples.mdreference/experimental.mdreference/lockfile-spec.mdreference/manifest-schema.mdreference/package-types.mdreference/policy-schema.mdreference/primitive-types.mdreference/registry-http-api.mdreference/targets-matrix.mdtroubleshooting/common-errors.mdtroubleshooting/compile-zero-output-warning.mdtroubleshooting/install-failures.mdtroubleshooting/migration.mdtroubleshooting/policy-debugging.mdtroubleshooting/ssl-issues.mdExpected behavior
All internal doc links resolve to the correct pages.
Environment