From f1dff8cd8283fdd5b5de569732f5f59bf67c4baa Mon Sep 17 00:00:00 2001 From: Mohit Sapat Date: Wed, 21 Oct 2026 12:03:38 +0530 Subject: [PATCH] fix(docs): add the /api/search route behind the search dialog 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. --- src/app/api/search/route.ts | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 src/app/api/search/route.ts diff --git a/src/app/api/search/route.ts b/src/app/api/search/route.ts new file mode 100644 index 0000000..4a5ff14 --- /dev/null +++ b/src/app/api/search/route.ts @@ -0,0 +1,5 @@ +import { createFromSource } from "fumadocs-core/search/server"; +import { source } from "@/lib/source"; + +// Backs the docs search dialog (Cmd+K), which queries /api/search by default. +export const { GET } = createFromSource(source);