Skip to content

Commit 8491593

Browse files
authored
fix: static search w/ basePath (#875)
1 parent f09973a commit 8491593

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

docs/app/layout.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { RootProvider } from 'fumadocs-ui/provider/next';
22
import localFont from 'next/font/local';
33
import './global.css';
44
import 'katex/dist/katex.css';
5+
import { basePath } from '@/lib/basePath';
56

67
const satoshi = localFont({
78
src: [
@@ -59,7 +60,15 @@ export default function Layout({ children }: { children: React.ReactNode }) {
5960
className={`${satoshi.variable} ${clashDisplay.variable}`}
6061
suppressHydrationWarning>
6162
<body className="flex flex-col min-h-screen">
62-
<RootProvider>{children}</RootProvider>
63+
<RootProvider
64+
search={{
65+
options: {
66+
type: 'static',
67+
api: `${basePath}/api/search`,
68+
},
69+
}}>
70+
{children}
71+
</RootProvider>
6372
</body>
6473
</html>
6574
);

0 commit comments

Comments
 (0)