mirror of
https://github.com/Dokploy/website.git
synced 2026-07-04 05: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.
24 lines
538 B
TypeScript
24 lines
538 B
TypeScript
import { getLLMText, source } from "@/lib/source";
|
|
|
|
export const revalidate = false;
|
|
|
|
const baseUrl = "https://docs.dokploy.com";
|
|
|
|
export async function GET() {
|
|
const pages = source
|
|
.getPages()
|
|
.filter((page) => !page.url.startsWith("/docs/api/"));
|
|
|
|
const scan = pages.map(getLLMText);
|
|
const scanned = await Promise.all(scan);
|
|
|
|
const content = [
|
|
...scanned,
|
|
"# API Reference",
|
|
"",
|
|
`For the complete API reference, see the OpenAPI specification: ${baseUrl}/openapi.json`,
|
|
];
|
|
|
|
return new Response(content.join("\n\n"));
|
|
}
|