import { loader, type InferPageType } from 'fumadocs-core/source'; import { docs } from 'collections/server'; import { lucideIconsPlugin } from "fumadocs-core/source/lucide-icons"; export const source = loader({ source: docs.toFumadocsSource(), baseUrl: "/docs", plugins: [lucideIconsPlugin()], }); export function getPageMarkdownUrl(page: InferPageType) { const segments = [...page.slugs, 'content.md']; return { segments, url: `/llms.mdx/docs/${segments.join('/')}`, }; } export async function getLLMText(page: InferPageType) { const processed = await page.data.getText('processed'); return `# ${page.data.title} (${page.url}) ${processed}`; }