feat: support fumadocs

This commit is contained in:
ReaJason
2025-12-05 11:07:24 +08:00
parent 38ad19c7ea
commit 69910ec187
140 changed files with 4788 additions and 1438 deletions
+17
View File
@@ -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();
}