Repository navigation
fix(docs): add the /api/search route behind the search dialog - #83
Conversation
The Cmd+K dialog queries /api/search by default, but the route never existed, so every query returned 404. Serve it from the docs source with createFromSource.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Description
The docs search dialog (⌘K) queries
/api/search, but that route never existed, so every query returned 404 and search showed no results.src/app/api/search/route.ts, serving the index from the docs source viacreateFromSource. Results cover page titles, headings and body text.Type of change
Checklist
npm run lintpassesnpm run typecheckpassesnpm run testpassesnpm run buildpassesNotes
Verified locally:
switcherreturns 25 hits,widgetreturns 12. The route is dynamic (ƒ /api/search).Summary by CodeRabbit