fix(docs): rewrite cross-skill SKILL.md links so Docs Deploy build passes#166
Merged
Conversation
The Docs Deploy build (run 27131977843) failed after #142 merged: Docusaurus threw on broken markdown links because generated agent and skill pages still pointed at relative `SKILL.md` paths (e.g. `../skills/prereq-check/SKILL.md`, `../azure-stack-destroy/SKILL.md`) that don't exist in the rendered site. generate-docs.js rewrote `.agent.md` links and skill script/reference links but never handled cross-references to other skills' SKILL.md files. Add rewriteSkillRefLinks(): from agent pages it targets `../skills/<slug>`, from skill pages `./<slug>`. Regenerated docs; `docusaurus build` now passes. Also regenerates git-ape-release.md, which had drifted from its source workflow after #144.
sendtoshailesh
approved these changes
Jun 8, 2026
Contributor
sendtoshailesh
left a comment
There was a problem hiding this comment.
Reviewed the generator change and regenerated docs end to end.
rewriteSkillRefLinks()matches the broken cross-skillSKILL.mdlink shapes used today (../skills/<name>/SKILL.mdfrom agents and../<name>/SKILL.mdfrom skills), derives the slug from the skill directory, and emits the correct Docusaurus-relative targets (../skills/<slug>vs./<slug>).- The change is wired into both agent and skill body processing without disturbing the existing
.agent.mdandscripts//references/rewrites. - I validated on the PR head by running
node scripts/generate-docs.jsandDOCUSAURUS_BASE_URL=/ npm --prefix website run build; the build succeeds. I also checked the generated docs for leftover markdown links toSKILL.md,.agent.md, or relativescripts//references/targets and didn't find any unresolved cases. - The
git-ape-release.mdregeneration lines up with the current workflow and looks like legitimate drift correction rather than an accidental doc edit.
I did not find any blocking issues. The only future edge case I can think of would be SKILL.md links that include anchors or query strings, but none of the current sources use that pattern, so this PR looks merge-ready for the stated fix.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the failed Git-Ape: Docs Deploy run on
main(run 27131977843).Problem
After #142 merged, the Docusaurus production build failed with broken-markdown-link errors. Generated agent and skill pages still contained relative
SKILL.mdcross-references that do not exist in the rendered site, e.g.:docs/agents/azure-resource-deployer.md→../skills/prereq-check/SKILL.mddocs/agents/azure-template-generator.md→../skills/azure-rest-api-reference/SKILL.mddocs/skills/azure-stack-deploy.md→../azure-stack-destroy/SKILL.mddocs/skills/azure-stack-destroy.md→../azure-stack-deploy/SKILL.mdscripts/generate-docs.jsalready rewrote sibling.agent.mdlinks and skillscripts//references/links, but never handled cross-references to other skills'SKILL.mdfiles, so Docusaurus (onBrokenMarkdownLinks: throw) aborted the build.Fix
rewriteSkillRefLinks(body, targetBase)to the generator. It rewrites any[label](.../<skill>/SKILL.md)link to the docusaurus slug:../skills/<slug>from agent pages,./<slug>from skill pages.Validation
node scripts/generate-docs.js— cleannpm run build(withDOCUSAURUS_BASE_URL=/) —[SUCCESS] Generated static files, no broken-link errorsSKILL.mdlinks inwebsite/docs/Note
This PR also regenerates
website/docs/workflows/git-ape-release.md, which had drifted from its source workflow after #144 (the generated doc was not refreshed at the time). Regeneration brings it back in sync with.github/workflows/git-ape-release.yml.