mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-25 04:20:02 +00:00
The API reference is the single-page OpenAPI reference at /docs/openapi. /docs/api (and /api, /api-reference) returned 404 because they were never routes, and the /api redirect declared in next.config redirects() is dead: docs.hanzo.ai deploys as a static export (out/) to Cloudflare Pages, which ignores next.config redirects() and middleware (proven live: /api and /tutorials both 404 despite being declared there). Add public/_redirects -- the mechanism CF Pages actually honors, exactly like the existing public/_headers -- as the single source of truth for redirects: /docs/api, /docs/api/*, /api, /api/*, /api-reference, /api-reference/* -> /docs/openapi /tutorials, /tutorials/* -> /docs/services (migrated from the dead config) Remove the now-dead redirects() block from next.config so there is one mechanism, not two. Also fix two broken internal links in services/chat.mdx that pointed at non-existent pages: /docs/api/pricing -> /docs/services/pricing /docs/models -> /docs/chat/models Verified with `wrangler pages dev` against the exact _redirects file: /docs/api -> 301 -> /docs/openapi (200); the real /docs/api-keys page is not over-captured (passes through, no redirect).