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

@@ -24,6 +24,7 @@
"autoprefixer": "10.4.14",
"clsx": "^2.0.0",
"docs-ui": "*",
"docs-utils": "*",
"jsdom": "^22.1.0",
"json-schema": "^0.4.0",
"json-stringify-pretty-compact": "^4.0.0",

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),
}
})
)