Skip to content

Commit 3ec6d89

Browse files
committed
chore: static export docs
1 parent 27f7bd2 commit 3ec6d89

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

docs/app/api/search/route.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@ import { createFromSource } from 'fumadocs-core/search/server'
22

33
import { source } from '@/lib/source'
44

5-
export const { GET } = createFromSource(source)
5+
export const revalidate = false
6+
7+
export const { staticGET: GET } = createFromSource(source)

docs/app/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export default ({ children }: Readonly<PropsWithChildren>) => (
1717
<link href="https://github.com/moeru-ai.png" rel="icon" type="image/png" />
1818
</head>
1919
<body className="flex flex-col min-h-screen">
20-
<RootProvider>{children}</RootProvider>
20+
<RootProvider search={{ options: { type: 'static' } }}>{children}</RootProvider>
2121
</body>
2222
</html>
2323
)

docs/next.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ const withMDX = createMDX()
44

55
/** @type {import('next').NextConfig} */
66
const config = {
7+
output: 'export',
78
reactStrictMode: true,
89
serverExternalPackages: ['typescript', 'twoslash'],
910
}

0 commit comments

Comments
 (0)