mirror of
https://github.com/jamiepine/voicebox.git
synced 2026-09-15 04:40:40 -07:00
- Updated `.gitignore` to include new build and generated content directories. - Removed outdated Mintlify configuration files and documentation. - Introduced new `MIGRATION.md` to outline the transition from Mintlify to Fumadocs. - Added `mdx-components.tsx` for MDX component configuration and compatibility. - Updated `package.json` and `next.config.mjs` for new dependencies and Next.js configuration. - Created `source.config.ts` for content source configuration. - Added OpenAPI specification in `openapi.json` for API documentation. - Removed legacy files and adjusted project structure to align with Fumadocs conventions.
28 lines
737 B
TypeScript
28 lines
737 B
TypeScript
import { docs } from '@/.source';
|
|
import { type InferPageType, loader } from 'fumadocs-core/source';
|
|
import { lucideIconsPlugin } from 'fumadocs-core/source/lucide-icons';
|
|
|
|
// See https://fumadocs.dev/docs/headless/source-api for more info
|
|
export const source = loader({
|
|
baseUrl: '/docs',
|
|
source: docs.toFumadocsSource(),
|
|
plugins: [lucideIconsPlugin()],
|
|
});
|
|
|
|
export function getPageImage(page: InferPageType<typeof source>) {
|
|
const segments = [...page.slugs, 'image.png'];
|
|
|
|
return {
|
|
segments,
|
|
url: `/og/docs/${segments.join('/')}`,
|
|
};
|
|
}
|
|
|
|
export async function getLLMText(page: InferPageType<typeof source>) {
|
|
const processed = await page.data.getText('processed');
|
|
|
|
return `# ${page.data.title}
|
|
|
|
${processed}`;
|
|
}
|