Skip to content

fix(docs-transforms): append trailing slash to rewritten markdown URLs#63

Merged
tkstang merged 1 commit intomainfrom
fix/remark-links-trailing-slash
Apr 27, 2026
Merged

fix(docs-transforms): append trailing slash to rewritten markdown URLs#63
tkstang merged 1 commit intomainfrom
fix/remark-links-trailing-slash

Conversation

@tkstang
Copy link
Copy Markdown

@tkstang tkstang commented Apr 27, 2026

Summary

  • remarkLinks now appends / to the path portion of rewritten internal links so they resolve on static hosts (e.g., S3) where pages live at <route>/index.html and /foo returns 403. Asset links with extensions, absolute URLs, pure anchors, and URLs already ending in / are left untouched.
  • URL parsing was extended to split on ? in addition to #, so query-suffixed links rewrite correctly. Also handles bare self-link . (now ./).
  • Lockstep patch bump 0.0.50 → 0.0.51 across cli, control-plane, docs-config, docs-theme, docs-transforms per AGENTS.md.

Test plan

  • pnpm --filter @open-agent-toolkit/docs-transforms test (31/31 passing)
  • pnpm release:validate (5/5 packages)
  • pnpm --filter @open-agent-toolkit/docs-transforms lint / type-check / format
  • Verify rebuilt docs site on a trailingSlash: true Next.js + S3 deploy resolves /user-guide/ etc. without 403

remarkLinks now appends `/` to the path portion of rewritten internal links
so they resolve on static hosts (e.g., S3) where pages live at
`<route>/index.html` and `/foo` returns 403. Asset links with extensions,
absolute URLs, pure anchors, and URLs already ending in `/` are unchanged.
URL parsing also splits on `?` so query-suffixed links rewrite correctly.

Lockstep bump (cli, control-plane, docs-config, docs-theme, docs-transforms)
0.0.50 -> 0.0.51 per AGENTS.md.
@tkstang tkstang merged commit 7e5886e into main Apr 27, 2026
2 checks passed
@tkstang tkstang deleted the fix/remark-links-trailing-slash branch April 27, 2026 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant