|
|
@@ -1,4 +1,4 @@
|
|
|
-import fs from "node:fs/promises";
|
|
|
+import { readFile } from "node:fs/promises";
|
|
|
|
|
|
import type { Page } from "fumadocs-core/source";
|
|
|
import { remarkInclude } from "fumadocs-mdx/config";
|
|
|
@@ -11,7 +11,7 @@ const processor = remark().use(remarkMdx).use(remarkInclude).use(remarkGfm);
|
|
|
export async function getLLMText(page: Page) {
|
|
|
const processed = await processor.process({
|
|
|
path: page.absolutePath,
|
|
|
- value: await fs.readFile(page.absolutePath, "utf8"),
|
|
|
+ value: await readFile(page.absolutePath, "utf8"),
|
|
|
});
|
|
|
|
|
|
return `# ${page.data.title ?? "Untitled"}
|