docs: add generator for llms-full.txt (#11323)

* initial

* improvements

* finished implementation

* transform links to index.html.md links

* fix for resources
This commit is contained in:
Shahed Nasser
2025-02-05 16:34:39 +02:00
committed by GitHub
parent da25980d24
commit 5f7ff7f9f0
17 changed files with 31023 additions and 17 deletions

View File

@@ -6,6 +6,7 @@ import readSpecDocument from "./read-spec-document"
import getSectionId from "./get-section-id"
import dereference from "./dereference"
import { unstable_cache } from "next/cache"
import { oasFileToPath } from "docs-utils"
async function getPathsOfTag_(
tagName: string,
@@ -25,9 +26,7 @@ async function getPathsOfTag_(
return {
...fileContent,
operationPath: `/${file
.replaceAll(/(?<!\{[^}]*)_(?![^{]*\})/g, "/")
.replace(/\.[A-Za-z]+$/, "")}`,
operationPath: oasFileToPath(file),
}
})
)