From ac3ba5b8e9eccb898e768d34211999940715ed70 Mon Sep 17 00:00:00 2001 From: "blink-so[bot]" <211532188+blink-so[bot]@users.noreply.github.com> Date: Tue, 9 Dec 2025 14:52:59 +0000 Subject: [PATCH] docs: remove unused _redirects file and document redirect process The _redirects file format is used by Netlify and Cloudflare Pages, but coder.com runs on Vercel with Next.js. Redirects for coder.com/docs must be configured in the coder/coder.com repository redirects.json file. This file was never functional and caused confusion when renaming docs. --- .claude/docs/DOCS_STYLE_GUIDE.md | 12 ++++++++++++ docs/_redirects | 13 ------------- 2 files changed, 12 insertions(+), 13 deletions(-) delete mode 100644 docs/_redirects diff --git a/.claude/docs/DOCS_STYLE_GUIDE.md b/.claude/docs/DOCS_STYLE_GUIDE.md index 4c0ded7928f98..00ee7758f88aa 100644 --- a/.claude/docs/DOCS_STYLE_GUIDE.md +++ b/.claude/docs/DOCS_STYLE_GUIDE.md @@ -300,6 +300,17 @@ Some content is auto-generated with comments: Don't manually edit auto-generated sections. +## URL Redirects + +When renaming or moving documentation pages, redirects must be added to prevent broken links. + +**Important**: Redirects are NOT configured in this repository. The coder.com website runs on Vercel with Next.js and reads redirects from a separate repository: + +- **Redirect configuration**: https://github.com/coder/coder.com/blob/master/redirects.json +- **Do NOT create** a `docs/_redirects` file - this format (used by Netlify/Cloudflare Pages) is not processed by coder.com + +When you rename or move a doc page, create a PR in coder/coder.com to add the redirect. + ## Key Principles 1. **Research first** - Verify against actual code implementation @@ -307,3 +318,4 @@ Don't manually edit auto-generated sections. 3. **Visual structure** - Organize around screenshots when available 4. **Link everything** - Related docs, API endpoints, CLI references 5. **Manifest inclusion** - Add to manifest.json for navigation +6. **Add redirects** - When moving/renaming pages, add redirects in coder/coder.com repo diff --git a/docs/_redirects b/docs/_redirects deleted file mode 100644 index a97d5edfd918e..0000000000000 --- a/docs/_redirects +++ /dev/null @@ -1,13 +0,0 @@ -# Redirect old offline deployments URL to new airgap URL -/install/offline /install/airgap 301 - -# Redirect old offline anchor fragments to new airgap anchors -/install/offline#offline-docs /install/airgap#airgap-docs 301 -/install/offline#offline-container-images /install/airgap#airgap-container-images 301 - -# Redirect old devcontainers folder to envbuilder -/admin/templates/managing-templates/devcontainers /admin/templates/managing-templates/envbuilder 301 -/admin/templates/managing-templates/devcontainers/index /admin/templates/managing-templates/envbuilder 301 -/admin/templates/managing-templates/devcontainers/add-devcontainer /admin/templates/managing-templates/envbuilder/add-envbuilder 301 -/admin/templates/managing-templates/devcontainers/devcontainer-security-caching /admin/templates/managing-templates/envbuilder/envbuilder-security-caching 301 -/admin/templates/managing-templates/devcontainers/devcontainer-releases-known-issues /admin/templates/managing-templates/envbuilder/envbuilder-releases-known-issues 301