We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f826b96 commit 7f21a28Copy full SHA for 7f21a28
1 file changed
apps/docs/app/api/search/route.ts
@@ -0,0 +1,10 @@
1
+import { source } from '@/app/source';
2
+import { createSearchAPI } from 'fumadocs-core/search/server';
3
+
4
+export const { GET } = createSearchAPI('simple', {
5
+ indexes: source.getPages().map((page) => ({
6
+ title: page.data.title ?? 'Untitled',
7
+ content: page.data.description ?? '',
8
+ url: page.url,
9
+ })),
10
+});
0 commit comments