llms-full.txt

Offer the complete documentation corpus in one Markdown-friendly response.

Included in starter templates

This functionality is already configured in the starter templates. Follow the complete setup in the Quickstart.

/llms-full.txt combines every generated documentation page into one plain-text response. It is useful when an assistant needs broad context—for example, to prepare an onboarding brief, compare several parts of the API, or index a small documentation site.

Heyo Docs builds the response from the Markdown page registry. The result has no frontmatter or documentation UI, so it is more useful to a language model than downloading and scraping a series of rendered HTML pages.

When to use it

Use the full document for offline indexing, evaluation fixtures, or tasks that span many pages. For interactive questions, start with llms.txt and load the individual Markdown pages instead. Targeted retrieval keeps prompts smaller, reduces repeated context, and makes the sources easier to inspect.

Response contract

Expose this file at /llms-full.txt with:

text
content-type: text/plain; charset=utf-8

The document is generated at request time by the React Router and Next.js templates. Astro emits the equivalent static response during its build. In all cases the source is the same content registry used by the docs UI.

Because the file may grow with every MDX page, do not treat it as the default context window for an agent. Keep llms.txt and per-page Markdown endpoints available alongside it.

React Router

Create a project

The React Router template generated by create-heyo-docs includes this resource route and adds /llms-full.txt to its static prerender list. Set siteUrl in the generated configuration before deployment.

bun create @heyo-sh/heyo-docs my-docs --template react-router

Manual, minimal configuration

Register llms-full.txt before the documentation catch-all, then generate the response from the server-side virtual content registry:

app/routes.ts
route("llms-full.txt", "routes/llms-full.ts"),
route("*", "routes/docs.tsx"),
app/routes/llms-full.ts
import { llmsFull } from "@heyo-sh/heyo-docs";
import type { LoaderFunctionArgs } from "react-router";

import config from "../../heyo-docs.config";
import { pages } from "virtual:heyo-docs-content/server";

export function loader({ request }: LoaderFunctionArgs) {
  const siteUrl = config.siteUrl ?? new URL(request.url).origin;
  return new Response(llmsFull(pages, siteUrl), {
    headers: { "content-type": "text/plain; charset=utf-8" },
  });
}

Include /llms-full.txt in react-router.config.ts's prerender() result when the documentation is served statically.

Next.js

Create a project

The Next.js project produced by create-heyo-docs includes the Route Handler and runs the content generator that creates markdownPages before development and production builds.

bun create @heyo-sh/heyo-docs my-docs --template next

Manual, minimal configuration

Follow the manual Next.js setup to generate the content registry and re-export config and markdownPages from app/lib/docs.ts. Then add the Route Handler:

app/llms-full.txt/route.ts
import { llmsFull } from "@heyo-sh/heyo-docs/node";

import { config, markdownPages } from "../lib/docs";

export function GET(request: Request) {
  const siteUrl = config.siteUrl ?? new URL(request.url).origin;
  return new Response(llmsFull(markdownPages, siteUrl), {
    headers: { "content-type": "text/plain; charset=utf-8" },
  });
}

Astro

Create a project

The Astro project produced by create-heyo-docs contains a static src/pages/llms-full.txt.ts API route. It is emitted during astro build alongside the documentation output.

bun create @heyo-sh/heyo-docs my-docs --template astro

Manual, minimal configuration

After configuring heyoDocsAstro({ config }), add this API route under src/pages:

src/pages/llms-full.txt.ts
import type { APIRoute } from "astro";
import { llmsFull } from "@heyo-sh/heyo-docs";

import config from "../../heyo-docs.config";
import { pages } from "virtual:heyo-docs-content/server";

export const GET: APIRoute = ({ request }) => {
  const siteUrl = config.siteUrl ?? new URL(request.url).origin;
  return new Response(llmsFull(pages, siteUrl), {
    headers: { "content-type": "text/plain; charset=utf-8" },
  });
};