docs: add static search support for documentation site
This commit is contained in:
parent
8b5abfe832
commit
af9c3cb025
|
|
@ -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' }];
|
||||
}
|
||||
Loading…
Reference in New Issue