mirror of
https://github.com/Dokploy/website.git
synced 2026-06-16 04:35:26 +02:00
- Standardized import statements across various components to use double quotes for consistency. - Updated component files to ensure proper formatting and adherence to coding standards. - Enhanced overall code readability by aligning code structure and improving comment clarity. - Made minor adjustments to ensure all components follow the same coding conventions, improving maintainability.
36 lines
984 B
TypeScript
36 lines
984 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}`;
|
|
}
|