Repository navigation
docs: add redirects.json and rebuild the docs site when it changes - #30208
Merged
nickvigilante merged 1 commit intoOct 2, 2026
Conversation
Add docs/redirects.json, an empty list of redirect rules, so a docs page move and its redirect can ship in the same PR. The docs website reads the file at build time. The deploy-docs workflow already rebuilds the website when docs/manifest.json changes. Give docs/redirects.json its own redirects_changed signal and rebuild on either file. It is a separate output so a redirects-only push does not also force the whole-branch search reindex that a manifest change does. The rebuild step summary now names the file that changed. Update the docs contributing guidance that told authors to open a second PR in the website repository for a redirect. Assisted-by: AI
nickvigilante
force-pushed
the
vigilante/docs-1156-codercoder-add-docsredirectsjson-and-rebuild-codercom-when
branch
from
October 1, 2026 15:42
48c3b42 to
127919c
Compare
nickvigilante
marked this pull request as ready for review
October 1, 2026 21:03
nickvigilante
deleted the
vigilante/docs-1156-codercoder-add-docsredirectsjson-and-rebuild-codercom-when
branch
October 2, 2026 14:30
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Adds
docs/redirects.json(an empty list for now) so a docs page move and its redirect can land in one PR, and makes the docs site rebuild when that file changes.The
vercel-rebuildjob indeploy-docs.yamlonly fired whendocs/manifest.jsonchanged, so a redirects-only push would have waited for the daily rebuild. Thechangesjob now also emitsredirects_changed, and the rebuild runs when either output istrue.manifest_changedis deliberately untouched: it also forces the whole-branch search reindex, which a redirect change does not need. On a first push to a branch or when the diff cannot be computed,redirects_changedistrue, likemanifest_changed. For non-push events it isfalse. The rebuild step summary now names whichever file changed, and is byte-identical to before for manifest-only pushes.The docs contributing guidance (
content-guidelines.md,DOCS_STYLE_GUIDE.md, and thedoc-checkandwrite-docsskills) told authors to open a second PR in the website repository for a redirect. It now points atdocs/redirects.json, documents the rule shape, and says to backport a move together with its redirect, since the unversioned docs are served from the mainline release branch.This is a draft because the file has no effect until the website build reads it. Redirects that predate this file are unchanged. The
audit-docs-pathsworkflow still reads only the existing website redirect file and is not touched here. Once merged, thecherry-picklabel would bring the initial file to the mainline release branch.Verification (run locally; the workflow itself has not run in GitHub Actions, and the
if:expression is only evaluated by GitHub):I extracted the real
changesstep script from the old and new workflow files and ran each against a throwaway local git remote, one commit per scenario, withgawkonPATH:manifest_changedmanifest_changed,redirects_changedworkflow_dispatchBEFORE_SHAmanifest_changedandpaths_jsonare identical to before in every scenario.I also ran the real
vercel-rebuildstep against a local fake deploy hook. TheReasonline reads`docs/manifest.json` changedfor a manifest-only push (summary file byte-identical to the old workflow's),`docs/redirects.json` changedfor a redirects-only push, and names both when both changed.Checks run, all exit 0:
actionlint(clean on the old file too),zizmor --strict-collection --persona=regular,make lint/emdash,go run ./scripts/docshtmlcheck,go run ./scripts/styleclaims, and the repo-pinnedmarkdownlint-cli2v0.16.0 over the 514 filespnpm lint-docscovers (no--fix).Not run: Vale (
misedoes not trustmise.tomlin a fresh worktree),typos(not installed), and the repository git hooks (opt-in, not enabled).🤖 Built with AI assistance.
CI notes
gen,offlinedocs, andrequiredfailed ondocs/manifest/generated/cli.jsondrift that came frommain(fixed there in fix(docs): regenerate CLI manifest for coder sharing #30216), not from this PR. Rebased ontomainto pick up the fix; the merge commit from the previous update is gone.Storybookthen failed because the Pixel upload returned HTTP 500 for 11 snapshots and the browser context closed mid-run. This PR changes no frontend code, so it is a flake. Failed job rerun.Generated by Coder Agents on behalf of @nickvigilante.