docs: add orama search support (#4366)

This commit is contained in:
Alex Yang
2025-09-02 14:34:49 -07:00
committed by GitHub
parent 74e94c72f0
commit 8849a9bcb3
9 changed files with 344 additions and 14 deletions

View File

@@ -0,0 +1,14 @@
import { source } from "@/lib/source";
import type { OramaDocument } from "fumadocs-core/search/orama-cloud";
export async function exportSearchIndexes() {
return source.getPages().map((page) => {
return {
id: page.url,
structured: page.data.structuredData,
url: page.url,
title: page.data.title,
description: page.data.description,
} satisfies OramaDocument;
});
}