Skip to content

fix(docs): rewrite cross-skill SKILL.md links so Docs Deploy build passes#166

Merged
arnaudlh merged 1 commit into
mainfrom
fix/docs-broken-markdown-links
Jun 8, 2026
Merged

fix(docs): rewrite cross-skill SKILL.md links so Docs Deploy build passes#166
arnaudlh merged 1 commit into
mainfrom
fix/docs-broken-markdown-links

Conversation

@arnaudlh
Copy link
Copy Markdown
Member

@arnaudlh arnaudlh commented Jun 8, 2026

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.md cross-references that do not exist in the rendered site, e.g.:

  • docs/agents/azure-resource-deployer.md../skills/prereq-check/SKILL.md
  • docs/agents/azure-template-generator.md../skills/azure-rest-api-reference/SKILL.md
  • docs/skills/azure-stack-deploy.md../azure-stack-destroy/SKILL.md
  • docs/skills/azure-stack-destroy.md../azure-stack-deploy/SKILL.md

scripts/generate-docs.js already rewrote sibling .agent.md links and skill scripts//references/ links, but never handled cross-references to other skills' SKILL.md files, so Docusaurus (onBrokenMarkdownLinks: throw) aborted the build.

Fix

  • Add 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.
  • Wire it into both agent and skill body processing.
  • Regenerate docs.

Validation

  • node scripts/generate-docs.js — clean
  • npm run build (with DOCUSAURUS_BASE_URL=/) — [SUCCESS] Generated static files, no broken-link errors
  • Repo-wide grep confirms zero remaining relative SKILL.md links in website/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.

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.
@arnaudlh arnaudlh requested a review from sendtoshailesh June 8, 2026 10:45
@arnaudlh arnaudlh self-assigned this Jun 8, 2026
@arnaudlh arnaudlh added bug Something isn't working documentation Improvements or additions to documentation labels Jun 8, 2026
Copy link
Copy Markdown
Contributor

@sendtoshailesh sendtoshailesh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the generator change and regenerated docs end to end.

  • rewriteSkillRefLinks() matches the broken cross-skill SKILL.md link shapes used today (../skills/<name>/SKILL.md from agents and ../<name>/SKILL.md from 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.md and scripts/ / references/ rewrites.
  • I validated on the PR head by running node scripts/generate-docs.js and DOCUSAURUS_BASE_URL=/ npm --prefix website run build; the build succeeds. I also checked the generated docs for leftover markdown links to SKILL.md, .agent.md, or relative scripts/ / references/ targets and didn't find any unresolved cases.
  • The git-ape-release.md regeneration 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.

@arnaudlh arnaudlh merged commit 9c409cc into main Jun 8, 2026
4 checks passed
@arnaudlh arnaudlh deleted the fix/docs-broken-markdown-links branch June 8, 2026 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants