mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-26 10:55:57 +00:00
16 lines
408 B
TypeScript
16 lines
408 B
TypeScript
import { loader, type InferPageType } from 'fumadocs-core/source';
|
|
import { docs } from 'fumadocs-mdx:collections/server';
|
|
|
|
export const source = loader({
|
|
source: docs.toFumadocsSource(),
|
|
baseUrl: '/docs',
|
|
});
|
|
|
|
export async function getLLMText(page: InferPageType<typeof source>) {
|
|
const processed = await page.data.getText('processed');
|
|
|
|
return `# ${page.data.title} (${page.url})
|
|
|
|
${processed}`;
|
|
}
|