mirror of
https://github.com/Dokploy/website.git
synced 2026-06-26 01:25:24 +02:00
- Updated `llms-full.txt` route to filter out API documentation pages and include a link to the OpenAPI specification. - Modified `llms.txt` route to also exclude API pages and added a section for the OpenAPI specification link. - Improved overall structure of the response content for better clarity and organization.
36 lines
962 B
TypeScript
36 lines
962 B
TypeScript
import { source } from "@/lib/source";
|
|
|
|
export const revalidate = false;
|
|
|
|
const baseUrl = "https://docs.dokploy.com";
|
|
|
|
export function GET() {
|
|
const pages = source.getPages();
|
|
const docsPages = pages.filter(
|
|
(page) => !page.url.startsWith("/docs/api/"),
|
|
);
|
|
|
|
const lines = [
|
|
"# Dokploy Documentation",
|
|
"",
|
|
"> Dokploy is an open-source, self-hostable Platform as a Service (PaaS) that simplifies the deployment and management of applications, databases, and services.",
|
|
"",
|
|
"## Docs",
|
|
"",
|
|
...docsPages.map(
|
|
(page) =>
|
|
`- [${page.data.title}](${baseUrl}${page.url})${page.data.description ? `: ${page.data.description}` : ""}`,
|
|
),
|
|
"",
|
|
"## API Reference",
|
|
"",
|
|
`- [OpenAPI Specification](${baseUrl}/openapi.json): Complete API reference in OpenAPI format`,
|
|
"",
|
|
"## Full Documentation",
|
|
"",
|
|
`- [llms-full.txt](${baseUrl}/llms-full.txt): All documentation pages as plain text`,
|
|
];
|
|
|
|
return new Response(lines.join("\n"));
|
|
}
|