mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-08-21 02:21:01 +00:00
3c087f6fd9
fumadocs-core 16.14.5 switched its search engine from Orama to zbsearch 4,
so the panel docs follow it up to the same major.
zbsearch 4 still rejects locale codes as tokenizer languages ("en" throws,
only "english" is accepted), so the custom search dialog that forces an
English index stays necessary — verified by loading the built static index
for all four locales and searching it through fumadocs' own client.
Around that:
- use `staticClient`, as `oramaStaticClient` is now a deprecated alias
- drop @orama/orama, which nothing depends on or imports any more
- correct the two comments that still described Orama and pointed at its
docs and tokenizer package, one of them suggesting a language zbsearch
does not have
- restore the corepack integrity hash on `packageManager`, which CI reads
through pnpm/action-setup
- prune minimumReleaseAgeExclude entries for versions no longer installed
The API reference MDX changes are serialization-only: fumadocs-openapi
11.2.4 emits plain scalars where it used folded ones. Parsed frontmatter
and page bodies are unchanged.
18 lines
572 B
TypeScript
18 lines
572 B
TypeScript
import { source } from '@/lib/source';
|
|
import { createFromSource } from 'fumadocs-core/search/server';
|
|
|
|
// Required for `output: 'export'` — the search index is fully static.
|
|
export const revalidate = false;
|
|
export const dynamic = 'force-static';
|
|
|
|
// Every locale still serves English fallback content, so all map to zbsearch's
|
|
// English tokenizer (its SUPPORTED_LANGUAGES has no Persian or Chinese anyway).
|
|
export const { staticGET: GET } = createFromSource(source, {
|
|
localeMap: {
|
|
en: 'english',
|
|
fa: 'english',
|
|
ru: 'english',
|
|
zh: 'english',
|
|
},
|
|
});
|