docs: add static search support for documentation site

This commit is contained in:
t8y2 2026-05-07 13:56:42 +08:00
parent 8b5abfe832
commit af9c3cb025
1 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,13 @@
import { createFromSource } from 'fumadocs-core/search/server';
import { source } from '@/lib/source';
export const revalidate = false;
export const { staticGET: GET } = createFromSource(source, {
localeMap: {
cn: { language: 'english' },
},
});
export function generateStaticParams() {
return [{ lang: 'en' }, { lang: 'cn' }];
}