---
title: "llms.txt for Vue Sites"
description: "Ship a spec-compliant llms.txt for your Vue docs, by hand, at build time, or via a VitePress/Docusaurus plugin. Full format and setup."
canonical_url: "https://nuxtseo.com/learn-seo/vue/controlling-crawlers/llms-txt"
last_updated: "2026-07-16"
---

::key-takeaways
- llms.txt is a Markdown file at `/llms.txt` that gives AI tools a curated entry point to your docs instead of your whole site
- Ship it as a static file in `public/`, or generate it at build time from your content
- General search crawlers (GPTBot, ClaudeBot, PerplexityBot) don't request llms.txt today; the standard mainly serves AI coding assistants and MCP servers
::

The [llms.txt standard](https://llmstxt.org/) gives AI assistants a concise summary of your site's content. It's robots.txt for AI inference: instead of blocking access, it points AI tools at your most useful documentation.

[Jeremy Howard](https://github.com/AnswerDotAI/llms-txt) proposed the standard in September 2024. Unlike robots.txt, llms.txt uses Markdown and targets AI tools at inference time rather than crawlers at training time.

## When llms.txt Matters

llms.txt solves a specific problem: LLM context windows are too small to process entire websites. Your Vue documentation might be thousands of pages, but an AI assistant needs a curated entry point.

**llms.txt is useful for:**

- Documentation sites (API references, tutorials, guides)
- Open source projects
- Technical blogs with evergreen content
- Sites where AI assistants frequently reference your content

**llms.txt is overkill for:**

- Marketing sites without technical docs
- E-commerce product pages
- News sites with time-sensitive content
- Small sites with fewer than 10 pages

## llms.txt vs robots.txt

| Feature         | robots.txt               | llms.txt                        |
| --------------- | ------------------------ | ------------------------------- |
| Purpose         | Block/allow crawling     | Guide AI to useful content      |
| Format          | Custom syntax            | Markdown                        |
| When used       | Training data collection | Inference (answering questions) |
| Crawler support | All major crawlers       | Limited, AI coding tools        |
| Required        | No                       | No                              |

AI crawlers don't request llms.txt during inference today. GPTBot, ClaudeBot, and PerplexityBot rely on standard crawling and pre-built indexes, not llms.txt. The primary use case is AI coding assistants (Claude Code, Codex, Cursor) and MCP servers that explicitly fetch llms.txt to understand project documentation.

## File Format

llms.txt uses a structured Markdown format. It only requires an H1 title; everything else is optional.

```markdown [/llms.txt]
# Vue Router Documentation

> Vue Router is the official router for Vue.js. It deeply integrates with Vue.js core to make building Single Page Applications easy.

Key concepts: route matching, nested routes, navigation guards, route meta fields.

## Getting Started

- [Installation](https://router.vuejs.org/installation.html): Install Vue Router via [npm](https://npmjs.com)
- [Quick Start](https://router.vuejs.org/guide/): Basic router setup
- [Dynamic Routing](https://router.vuejs.org/guide/essentials/dynamic-matching.html): Route params and patterns

## API Reference

- [Router Instance](https://router.vuejs.org/api/#router-instance-methods): push, replace, go, back, forward
- [Route Object](https://router.vuejs.org/api/#the-route-object): params, query, hash, matched
- [Navigation Guards](https://router.vuejs.org/guide/advanced/navigation-guards.html): beforeEach, beforeResolve, afterEach

## Optional

- [Changelog](https://github.com/vuejs/router/blob/main/CHANGELOG.md)
- [Migration from Vue 2](https://router.vuejs.org/guide/migration/)
```

The H1 title is the only required element, the name of your project or site. Everything else is optional:

- **Blockquote**: brief summary with key information for understanding the rest of the file.
- **Body content**: paragraphs, lists, or any Markdown except headings, giving context about the project.
- **H2 sections**: file lists with links to detailed documentation. Each entry is a Markdown link with an optional description:

```markdown
- [Link Text](https://url): Optional description of what this page covers
```

- **Optional section**: an H2 titled "Optional" marks content that AI can skip if context is limited.

## Implementation

### Static File

The simplest approach: create a static file in your public directory.

```dir
public/
  llms.txt
```

```markdown [public/llms.txt]
# My Vue App

> A Vue 3 application with TypeScript and [Vite](https://vite.dev).

## Documentation

- [API Reference](/docs/api): REST API endpoints
- [Components](/docs/components): Vue component library
- [Getting Started](/docs/setup): Installation and configuration

## Optional

- [Changelog](/changelog)
```

Your file will be available at `https://yoursite.com/llms.txt`.

### Extended Version

The spec also supports `/llms-full.txt` for complete documentation when context limits aren't a concern:

```markdown [public/llms-full.txt]
# My Vue App - Full Documentation

> Complete documentation including all API endpoints, components, and guides.

[Full content of your docs here, potentially thousands of lines]
```

AI tools can choose between the concise `/llms.txt` or complete `/llms-full.txt` based on their needs.

If you don't want to build your own generation script, the [mdream llms.txt generator](https://mdream.dev/tools/llms-txt/generator) can create one from any URL.

### Build-Time Generation

For large documentation sites, generate llms.txt from your content at build time:

```ts [scripts/generate-llms-txt.ts]
import { readdir, readFile, writeFile } from 'node:fs/promises'
import { join } from 'node:path'

interface DocPage {
  title: string
  path: string
  description?: string
}

async function generateLlmsTxt() {
  const docsDir = './docs'
  const pages: DocPage[] = []

  // Scan docs directory for markdown files
  const files = await readdir(docsDir, { recursive: true })

  for (const file of files) {
    if (!file.endsWith('.md'))
      continue

    const content = await readFile(join(docsDir, file), 'utf-8')
    const titleMatch = content.match(/^#\s+(\S.*)$/m)
    const descMatch = content.match(/^>\s+(\S.*)$/m)

    if (titleMatch) {
      pages.push({
        title: titleMatch[1],
        path: `/docs/${file.replace('.md', '')}`,
        description: descMatch?.[1]
      })
    }
  }

  // Generate llms.txt content
  const llmsTxt = `# My Vue Documentation

> API reference and guides for My Vue App.

## Documentation

${pages.map(p => `- [${p.title}](${p.path})${p.description ? `: ${p.description}` : ''}`).join('\n')}
`

  await writeFile('./public/llms.txt', llmsTxt)
}

generateLlmsTxt()
```

Add to your build process:

```json [package.json]
{
  "scripts": {
    "build": "npm run generate:llms && vite build",
    "generate:llms": "tsx scripts/generate-llms-txt.ts"
  }
}
```

## Framework Plugins

Several documentation frameworks have llms.txt plugins:

### VitePress

```bash
npm install vitepress-plugin-llms
```

```ts [.vitepress/config.ts]
import { defineConfig } from 'vitepress'
import llmstxt from 'vitepress-plugin-llms'

export default defineConfig({
  vite: {
    plugins: [llmstxt()]
  }
})
```

### Docusaurus

```bash
npm install docusaurus-plugin-llms
```

```js [docusaurus.config.js]
export default {
  plugins: ['docusaurus-plugin-llms']
}
```

## Testing Your llms.txt

1. **Check it loads**: visit `https://yoursite.com/llms.txt`
2. **Validate format**: ensure the H1 exists and links are absolute URLs
3. **Test with AI**: paste your llms.txt into [ChatGPT](https://chatgpt.com) or Claude and ask about your docs

Use the [mdream llms.txt validator](https://mdream.dev/tools/llms-txt/validator) to check your file for format issues, or browse the [mdream llms.txt explorer](https://mdream.dev/llms-txt) to see how other projects structure theirs.

## Who Uses llms.txt?

The standard has [2,500+ GitHub stars](https://github.com/AnswerDotAI/llms-txt) and growing adoption among documentation sites. Notable implementers include [Answer.AI](http://Answer.AI) and [fast.ai](http://fast.ai), whose nbdev projects generate llms.txt by default.

Adoption by general search crawlers remains limited:

- No major AI crawler (GPTBot, ClaudeBot, PerplexityBot) requests llms.txt during inference
- AI coding assistants (Claude Code, Codex, Cursor) and MCP servers are the primary consumers; they use it to learn a library's structure quickly
- Documentation frameworks (VitePress, Docusaurus) generate it automatically

The spec is still emerging, so implementing llms.txt today is forward-looking: it positions your docs for AI integration as adoption grows.

## llms.txt and GEO

llms.txt complements [Generative Engine Optimization](/learn-seo/vue/launch-and-listen/ai-optimized-content) but serves a different purpose:

| GEO                                                              | llms.txt                                  |
| ---------------------------------------------------------------- | ----------------------------------------- |
| Optimizes content for AI citations                               | Provides structured entry point to docs   |
| Targets AI search (ChatGPT, [Perplexity](https://perplexity.ai)) | Targets AI coding tools and MCP servers   |
| Uses [schema.org](http://schema.org), content structure          | Uses Markdown file format                 |
| Improves visibility in AI responses                              | Improves AI understanding of your project |

For maximum AI visibility, implement both:

1. [Schema.org](http://Schema.org) structured data for GEO
2. llms.txt for documentation discovery
3. Content structure optimized for extraction

## Using Nuxt?

Nuxt has dedicated support for llms.txt via [nuxt-llms](https://github.com/harlan-zw/nuxt-llms):

```ts [nuxt.config.ts]
export default defineNuxtConfig({
  modules: ['nuxt-llms'],
  llms: {
    domain: 'https://example.com',
    title: 'My Nuxt App',
    description: 'Documentation for My Nuxt App',
    sections: [
      {
        title: 'Getting Started',
        links: [
          { title: 'Installation', href: '/docs/installation' },
          { title: 'Configuration', href: '/docs/configuration' }
        ]
      }
    ]
  }
})
```

[Learn more about AI optimization in Nuxt →](/learn-seo/nuxt/launch-and-listen/ai-optimized-content)

## Checklist

::checklist{#vue-llms-txt}
- Create a static `/llms.txt` or generate one at build time
- Confirm `/llms.txt` and `/llms-full.txt` build and load correctly
- Write a clear H1 title and blockquote summary
- Organize links into H2 sections, with an "Optional" section for skippable content
- Validate the file with the mdream llms.txt validator
::