fix(docs-transforms): append trailing slash to rewritten markdown URLs#63
Merged
fix(docs-transforms): append trailing slash to rewritten markdown URLs#63
Conversation
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.
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.
Summary
remarkLinksnow appends/to the path portion of rewritten internal links so they resolve on static hosts (e.g., S3) where pages live at<route>/index.htmland/fooreturns 403. Asset links with extensions, absolute URLs, pure anchors, and URLs already ending in/are left untouched.?in addition to#, so query-suffixed links rewrite correctly. Also handles bare self-link.(now./).cli,control-plane,docs-config,docs-theme,docs-transformsperAGENTS.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/formattrailingSlash: trueNext.js + S3 deploy resolves/user-guide/etc. without 403