feat: support fumadocs

This commit is contained in:
ReaJason
2025-12-08 01:43:41 +08:00
parent 8b71ca9911
commit ca1d567ce7
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();
}