Support for llms.js to dynamically generate llms.txt similar to robots.txt and sitemap.xml #80692
boraoksuzoglu
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
Note that you can today, already do export const dynamic = 'force-static'; // or make it dynamic if you want
export function GET() {
return new Response(`# Hello World`);
} Same with |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
Non-Goals
No response
Background
Currently, Next.js supports automatic route generation for sitemap.xml and robots.txt when developers create app/sitemap.js and app/robots.js, respectively. This system allows for declarative and optionally dynamic creation of standard metadata files used by crawlers.
In the same way, there’s a growing need to support the emerging llms.txt standard, which is being adopted to declare how websites interact with large language models. Having a dedicated file like llms.js that maps to a llms.txt route would fit naturally into the existing file-based routing and metadata system in Next.js.
Proposal
example: https://developers.cloudflare.com/llms.txt
// app/llms.js
// WEBSITE_URL/llms.txt
Beta Was this translation helpful? Give feedback.
All reactions