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
@@ -24,7 +24,9 @@ export async function GET(req: NextRequest, { params }: Params) {
path.join(process.cwd(), "app")
path.join(process.cwd(), "references")
const filePathFromMap = await getFileFromMaps(`/${slug.join("/")}`)
const filePathFromMap = await getFileFromMaps(
`/${slug.join("/")}`.replace("//", "/")
)
if (!filePathFromMap) {
return notFound()
}
@@ -77,7 +79,7 @@ export async function GET(req: NextRequest, { params }: Params) {
const getCleanMd_ = unstable_cache(
async (filePath: string, plugins?: { before?: Plugin[]; after?: Plugin[] }) =>
getCleanMd({ filePath, plugins }),
getCleanMd({ file: filePath, plugins }),
["clean-md"],
{
revalidate: 3600,