mirror of
https://github.com/ReaJason/MemShellParty.git
synced 2026-09-22 07:00:43 +08:00
feat: support fumadocs
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import { stopwords as mandarinStopwords } from "@orama/stopwords/mandarin";
|
||||
import { createTokenizer } from "@orama/tokenizers/mandarin";
|
||||
import { createFromSource } from "fumadocs-core/search/server";
|
||||
import { source } from "@/lib/source";
|
||||
|
||||
const server = createFromSource(source, {
|
||||
components: {
|
||||
tokenizer: createTokenizer({
|
||||
language: "mandarin",
|
||||
stopWords: mandarinStopwords,
|
||||
}),
|
||||
},
|
||||
});
|
||||
|
||||
export async function loader() {
|
||||
return server.staticGET();
|
||||
}
|
||||
Reference in New Issue
Block a user