mirror of
https://github.com/warmbly/warmbly.git
synced 2026-10-15 00:02:42 +00:00
16 lines
722 B
TypeScript
16 lines
722 B
TypeScript
import { source } from '@/lib/source';
|
|
import { createFromSource } from 'fumadocs-core/search/server';
|
|
|
|
// Build the search index at build time and serve it as a static JSON, so search
|
|
// works on a statically-exported / CDN-hosted build (no running server route).
|
|
// The client is set to `type: 'static'` in app/layout.tsx, which loads this
|
|
// index once and runs Orama in the browser.
|
|
export const revalidate = false;
|
|
|
|
export const { staticGET: GET } = createFromSource(source, {
|
|
// https://docs.orama.com/docs/orama-js/supported-languages
|
|
language: 'english',
|
|
// Search ranks by relevance; the sort table only serves sortBy and kept the static index over Pages' 25 MiB file limit.
|
|
sort: { enabled: false },
|
|
});
|