Files
copilotkit__copilotkit/docs/next.config.mjs
Sam Julien 495c331098 fix(docs): add redirects for active 404s on docs.copilotkit.ai
Adds 35 redirects in next.config.mjs covering every URL with
broken_link_accessed events from the last 30 days of PostHog data.

Categories:
- /generative-ui/specs/* → /learn/generative-ui/specs/* (section moved)
- /premium/{threads,inspector,premium/overview} → root equivalents
- /built-in-agent/guides/* → renamed pages or section index
- /built-in-agent/{human-in-the-loop,generative-ui/state-rendering,
  cookbook/state-machine} → closest matching concept
- /learn/direct-to-llm/* → /built-in-agent (namespace removed)
- /learn/langgraph/* → /langgraph/* (was never under /learn)
- /deepagents/{prebuilt-components,custom-look-and-feel/*} →
  root equivalents (deepagents integration is missing these pages)
- /guides/* with no /built-in-agent/guides equivalent → closest concept
- /reference/v1/hooks/{useRenderTool,useComponent,useThreads,
  useInterrupt,useCapabilities} → /reference/v2/hooks/<same>
  (these hooks are new in v2)
- /reference/v2/hooks/useCopilotAction → useFrontendTool (renamed)
- /whats-new/* → /learn/whats-new/*
- Doubled-prefix paths: /agent-spec/agent-spec/wayflow,
  /langgraph/langgraph/overview, /premium/premium/overview
- /langgraph/persistence/* → /langgraph/advanced/persistence/*
- /zh/langgraph/deep-agents → /deepagents (no i18n on this site)

Verified locally: every former-404 path returns 308 → 200 final.
2026-05-06 09:56:22 -07:00

22 KiB