mirror of
https://github.com/Dokploy/website.git
synced 2026-06-16 04:35:26 +02:00
- Enhanced API documentation with new MDX files and improved structure. - Updated OpenAPI specifications to reflect recent changes and added new components. - Refined global CSS and layout configurations for better styling and user experience. - Added various images and icons to enrich the visual aspects of the documentation. - Updated package dependencies to ensure compatibility with the latest features.
36 lines
997 B
TypeScript
36 lines
997 B
TypeScript
import { docs } from 'fumadocs-mdx:collections/server';
|
|
import { type InferPageType, loader } from 'fumadocs-core/source';
|
|
import { lucideIconsPlugin } from 'fumadocs-core/source/lucide-icons';
|
|
import { createOpenAPI } from 'fumadocs-openapi/server';
|
|
import { createAPIPage } from 'fumadocs-openapi/ui';
|
|
|
|
// See https://fumadocs.dev/docs/headless/source-api for more info
|
|
export const source = loader({
|
|
baseUrl: '/docs',
|
|
source: docs.toFumadocsSource(),
|
|
plugins: [lucideIconsPlugin()],
|
|
});
|
|
|
|
export const openapi = createOpenAPI({
|
|
input: ['./public/openapi.json'],
|
|
});
|
|
|
|
export const APIPage = createAPIPage(openapi);
|
|
|
|
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}`;
|
|
}
|