docs: fix the package publish anchor that breaks on the published site - #3653
docs: fix the package publish anchor that breaks on the published site#3653vincentkoc wants to merge 1 commit into
Conversation
The link resolves on GitHub and 404s on docs.openclaw.ai, because the two renderers slug headings differently. OpenClaw's publishing parser (scripts/lib/docs-markdown.mjs in openclaw/openclaw) percent-encodes punctuation instead of stripping it, so the real anchor id for `### `package publish <source>`` in docs/cli.md is `package-publish-%3Csource%3E`. This is a third instance of the class fixed in #3618, which corrected the two other cross-page anchors in this same file.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Codex review: needs maintainer review before merge. Reviewed September 9, 2026, 11:11 AM ET / 15:11 UTC. ClawSweeper reviewWhat this changesCorrects the publishing guide’s package-publish link to target the encoded heading on the published CLI reference. Merge readiness✅ Ready for maintainer review No blocking findings. Current main retains the broken fragment, and the published CLI page exposes the encoded heading targeted by this PR. The earlier merged anchor fix addressed different links. Priority: P3 Review scores
Verification
How this fits togetherClawHub owns the publishing guide and CLI reference source. The OpenClaw documentation publisher renders those files into pages whose heading IDs determine where cross-page links land. flowchart LR
A[Publishing guide] --> B[Cross-page link]
C[CLI reference heading] --> D[Documentation publisher]
D --> E[Encoded heading ID]
B --> E
E --> F[Package publishing instructions]
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Keep canonical source links aligned with published heading IDs while preserving the existing CLI heading and renderer contract. Do we have a high-confidence way to reproduce the issue? Yes: current main links to a fragment absent from the published CLI page, whose HTML contains the proposed encoded ID. This was verified through source and HTML inspection, without a browser click reproduction. Is this the best way to solve the issue? Yes—the one-link correction is the narrowest fix. Renaming the target heading or changing renderer behavior would unnecessarily affect other links. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 6b25e866fb91. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
What
docs/publishing.md:216links to./cli.md#package-publish-source. That anchor does not exist on the published site, so the link 404s on docs.openclaw.ai while resolving fine on GitHub.The heading it targets is`
### \package publishindocs/cli.md. OpenClaw's publishing parser (scripts/lib/docs-markdown.mjsin openclaw/openclaw) percent-encodes punctuation rather than stripping it, so the real anchor id ispackage-publish-%3Csource%3E`.This is a third instance of the class fixed in #3618, which corrected the two other cross-page anchors in this same file. Line 336 of this file already uses the encoded form, so line 216 was the lone outlier.
Why it matters beyond the 404
openclaw/openclaw's docs CI mirrors this repo (
OPENCLAW_DOCS_SYNC_CLAWHUB_REPO) and has an anchor audit (pnpm docs:check-links:anchors) that is not yet gated in CI. Work is underway to gate it. While the mirror is present, that audit enforces ClawHub fragments too, so this link is currently the only thing keeping that audit non-green.Validation
Ran openclaw's anchor audit against a checkout of this branch:
Before:
After:
I also swept every
docs/*.mdin this repo for the same defect class using the same parser; this was the only remaining broken in-repo fragment.