Commit Graph

8 Commits

Author SHA1 Message Date
Brendan O'Leary d2fb7defda Codex's first pass 2026-09-02 09:27:48 -04:00
Sushmitha Mallesh b14810b3a4 docs: dual API version reference (v3.1 + v3.0) (#3179) 2026-04-11 15:26:24 -07:00
sohamganatra 74601305b7 fix(docs): Move x-pathname header to proxy.ts, remove middleware.ts
Next.js 16 doesn't allow both middleware.ts and proxy.ts.
Set x-pathname header in the existing proxy.ts instead.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 16:48:07 -08:00
Sushmithamallesh 4b423e9183 refactor(docs): simplify kebab-case redirect logic
Remove redundant hasKebab detection loop. Since kebabToCamel() returns
input unchanged when there's no kebab pattern, the pathname comparison
already catches whether any conversion occurred.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 01:51:35 -08:00
Sushmithamallesh 3165eb0bcd fix(docs): move API reference redirect to proxy.ts
Next.js doesn't allow both middleware.ts and proxy.ts.
Added kebab-case → camelCase redirect logic to existing proxy.ts.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 01:37:37 -08:00
Sushmithamallesh e829507978 refactor(docs): migrate middleware.ts to proxy.ts for Next.js 16
Next.js 16 deprecated the "middleware" file convention in favor of "proxy".
Renamed file and function accordingly.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 17:33:41 -08:00
Sushmithamallesh 6dcddb83ac fix(docs): rename proxy.ts to middleware.ts and simplify
- Renamed proxy.ts → middleware.ts (Next.js requires this name)
- Renamed function proxy → middleware (Next.js requires this name)
- Simplified matcher to work for all pages (excludes api, _next, llms, static files)
- Middleware now properly executes for content negotiation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 15:55:21 -08:00
Sushmithamallesh 121691e970 feat(docs): add .md support and Accept header for AI agents
Following Lee Robinson's Agent-Ready principles:
- Add .md URL extension support (in addition to .mdx)
- Add proxy.ts for Accept: text/markdown header support
- Same URL serves HTML to browsers, Markdown to AI agents

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 14:12:52 -08:00