llms.txt

The docs site generates /llms.txt and /llms-full.txt automatically, giving language models an index and the full text of your docs. Learn where the defaults come from, how to set titles and sections, how they relate to each page's Markdown, and how to use them in Cursor and other tools.
View source

llms.txt is a convention for a site index aimed at language models. Movk Nuxt Docs integrates nuxt-llms and prerenders two files at build time:

FileContentUse it to
/llms.txtSite title, summary and page links pointing at each page's MarkdownLet a model see what the docs cover first
/llms-full.txtThe full Markdown of every pageHand the whole site to a tool with a long context window
View the /llms.txt generated for this site

Defaults

Without any configuration, the layer fills these in:

OptionSource
llms.domainNUXT_PUBLIC_SITE_URL, NUXT_SITE_URL, or the URL your host provides (Vercel, Netlify, Cloudflare Pages, GitLab Pages); https://example.com when none is set
llms.title / llms.full.titlesite.name, then name in package.json
llms.description / llms.full.descriptiondescription in package.json

domain prefixes every link in the files, so make sure it is the production URL before a production build.

Configuration

Override them under llms in nuxt.config.ts:

nuxt.config.ts
export default defineNuxtConfig({
  llms: {
    domain: 'https://docs.example.com',
    title: 'My Library',
    description: 'Official documentation for My Library: installation, configuration and API.',
    notes: [
      'Append .md to any page URL to get its Markdown'
    ],
    full: {
      title: 'My Library full documentation',
      description: 'The full Markdown of every documentation page.'
    }
  }
})
  • notes renders as a ## Notes list at the end of the file
  • /llms-full.txt is generated only when full is set, which the layer does by default

Page sections

Page links are read from the content collections by nuxt-agent-discovery and rewritten to their /raw/**.md URLs, the same content a reader gets by appending .md. To control the grouping, filter by collection and path with llms.sections:

nuxt.config.ts
export default defineNuxtConfig({
  llms: {
    sections: [
      {
        title: 'Getting Started',
        contentCollection: 'docs',
        contentFilters: [
          { field: 'path', operator: 'LIKE', value: '/docs/getting-started%' }
        ]
      },
      {
        title: 'Guide',
        contentCollection: 'docs',
        contentFilters: [
          { field: 'path', operator: 'LIKE', value: '/docs/guide/%' }
        ]
      }
    ]
  }
})

A section carrying its own links is kept as is, and its links to pages on the site are rewritten to their Markdown URLs too.

Extra details

agentDiscovery.llms.details inserts paragraphs between the summary and the first section, a good place to tell models how to use the files. It requires llms.description, and the paragraphs must not contain headings:

nuxt.config.ts
export default defineNuxtConfig({
  agentDiscovery: {
    llms: {
      details: [
        'Append `.md` to any page URL to get its Markdown.',
        'Read `llms-full.txt` when you need the whole site.'
      ]
    }
  }
})

Multiple languages

nuxt-llms generates a single /llms.txt per site; its title and summary are not localized. On a multilingual site, write llms.description in the language you want models to read and mention the other locales' prefixes (such as /en/docs) in details.

Relation to Markdown pages

llms.txt is only the entry point. Every page has its own Markdown representation, served by agent discovery:

Terminal
# Append .md to the page URL
curl https://docs.example.com/en/docs/getting-started.md

# Or request the raw path directly
curl https://docs.example.com/raw/en/docs/getting-started.md

MDC components are converted to plain Markdown first, so models get text they can read directly.

Use it in AI tools

  • Cursor: type @Docs in the chat and add https://docs.example.com/llms.txt as a docs source (type the @ by hand; pasting it does not trigger the menu)
  • Windsurf: reference the llms.txt URL with @docs, or put it in a workspace rule
  • ChatGPT, Claude and others: include the URL in your question, e.g. "answer using https://docs.example.com/llms.txt"

Start with /llms.txt and let the model fetch pages as needed; use /llms-full.txt only when the tool supports a very long context and must read everything at once. For ongoing lookups, connecting the MCP Server works better.

Copyright © 2024 - 2026