llms.txt for Vue Sites

Help AI assistants understand your Vue documentation with the llms.txt standard. Learn the file format, implementation, and when it matters.
Harlan WiltonHarlan Wilton8 mins read Published

The llms.txt standard provides AI assistants with a concise summary of your site's content. Think of it as robots.txt for AI inference—not blocking access, but guiding AI to your most useful documentation.

Jeremy Howard 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

Featurerobots.txtllms.txt
PurposeBlock/allow crawlingGuide AI to useful content
FormatCustom syntaxMarkdown
When usedTraining data collectionInference (answering questions)
Crawler supportAll major crawlersLimited—mostly AI coding tools
RequiredNoNo

Important: AI crawlers don't currently request llms.txt during inference. GPTBot, ClaudeBot, and PerplexityBot use pre-built datasets and respect robots.txt, not llms.txt.

The primary use case today is AI coding assistants (Cursor, Claude Code) and MCP servers that explicitly fetch llms.txt to understand project documentation.

File Format

llms.txt uses a structured Markdown format. Only the H1 title is required—everything else is optional.

/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
- [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/)

Required Sections

H1 Title — The only required element. Name of your project or site.

Optional Sections

Blockquote — Brief summary with key information for understanding the rest of the file.

Body content — Paragraphs, lists, or any Markdown except headings. Provides context about the project.

H2 sections — File lists with links to detailed documentation. Each entry is a Markdown link with optional description:

- [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.

public/
  llms.txt
public/llms.txt
# My Vue App

> A Vue 3 application with TypeScript and Vite.

## 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 comprehensive documentation when context limits aren't a concern:

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 comprehensive /llms-full.txt based on their needs.

Build-Time Generation

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

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+(.+)$/m)
    const descMatch = content.match(/^>\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:

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

npm install vitepress-plugin-llms
.vitepress/config.ts
import { defineConfig } from 'vitepress'
import llmstxt from 'vitepress-plugin-llms'

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

Docusaurus

npm install docusaurus-plugin-llms
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 H1 exists and links are absolute URLs
  3. Test with AI: Paste your llms.txt into ChatGPT or Claude and ask about your docs

There's no official validator yet, but the llms-txt-hub directory lists sites implementing the standard.

Who Uses llms.txt?

The standard has 2,000+ GitHub stars and growing adoption among documentation sites. Notable implementers include Answer.AI, fast.ai, and various open source projects.

However, adoption by AI providers is limited. As of late 2025:

  • No major AI crawler (GPTBot, ClaudeBot, PerplexityBot) requests llms.txt during inference
  • MCP servers and AI coding tools can use it when explicitly configured
  • Documentation frameworks (VitePress, Docusaurus) generate it automatically

The spec is still emerging. Implementing llms.txt today is forward-looking—it positions your docs for better AI integration as adoption grows.

llms.txt and GEO

llms.txt complements Generative Engine Optimization but serves a different purpose:

GEOllms.txt
Optimizes content for AI citationsProvides structured entry point to docs
Targets AI search (ChatGPT, Perplexity)Targets AI coding tools and MCP servers
Uses schema.org, content structureUses Markdown file format
Improves visibility in AI responsesImproves AI understanding of your project

For maximum AI visibility, implement both:

  1. 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:

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 →