AI coding agents: see /llms.txt for the full documentation index. Markdown version: /docs/manual/en/ai/llms.md.
TockDocs LogoTockDocs
AI

LLMs Integration

TockDocs generate AI-ready content files using Nuxt LLMs module

TockDocs integrates nuxt-llms by default to prepare your content for Large Language Models (LLMs). All your documentation pages are injected and /llms.txt and /llms-full.txt files are automatically generated and pre-rendered.

Have a look at the generated /llms.txt file on a deployed TockDocs site.

Defaults

Here are the default values use to generate the /llms.txt file:

  • domain → computed based on your deployment platform (or by using NUXT_SITE_URL env variable)
  • title → extracted from your package.json
  • description → extracted from your package.json
  • full.title → extracted from your package.json
  • full.description → extracted from your package.json

Customize

You can override your LLMs data from the nuxt.config.ts :

nuxt.config.ts
export default defineNuxtConfig({
  llms: {
    domain: 'https://your-site.com',
    title: 'Your Site Name',
    description: 'A brief description of your site',
    full: {
      title: 'Your Site Name',
      description: 'A brief description of your site',
    },
  },
})

Raw Markdown Access

When nuxt-llms is enabled, TockDocs exposes the original source markdown/MDC through canonical .md page URLs, so AI tools can avoid the verbose post-processed output.

How it works

  • Direct page alias: append .md to supported documentation page URLs to open the original pre-processed markdown/MDC source, for example /docs/manual/en/ai/llms.md or /en/getting-started/installation.md
  • Canonical markdown URL: append .md to a page route to get the original markdown/MDC source
  • Compatibility aliases: /source/<page-route>.md and /raw/<content-path>.md still resolve to the same original source markdown for older integrations
  • Content-Type: text/markdown; charset=utf-8
  • LLMs.txt integration: document links in llms.txt are automatically rewritten to .md page URLs, so agents fetch the original markdown/MDC instead of full HTML
Examples for this page:
  • Direct URL alias: /docs/manual/en/ai/llms.md
  • Compatibility source alias: /source/docs/manual/en/ai/llms.md
  • Compatibility raw alias: /raw/docs/manual/en/ai/llms.md

Configuration

You can customize the legacy nuxt-llms raw endpoint from your nuxt.config.ts:

nuxt.config.ts
export default defineNuxtConfig({
  llms: {
    contentRawMarkdown: {
      // Prevent specific page collections from being exposed
      excludeCollections: ['landing', 'landing_en', 'landing_fr'],
      // Keep llms.txt links pointing to rendered pages instead of raw markdown
      rewriteLLMSTxt: false,
    },
  },
})

To disable the legacy raw endpoint entirely:

nuxt.config.ts
export default defineNuxtConfig({
  llms: {
    contentRawMarkdown: false,
  },
})

Markdown Redirection

Direct .md page URLs work in every environment. On server-backed deployments, TockDocs also negotiates markdown responses from standard page URLs when agents send markdown-friendly headers. On Vercel, build-time route rules keep prerendered pages behaving the same way.

On server-backed deployments, TockDocs automatically serves markdown content to AI agents and CLI tools when requests prefer markdown responses.

Why?

Agents like Claude Code use Accept: text/markdown headers by default, so returning source Markdown saves lots of data transfer and tokens in the process.

How?

TockDocs detects requests from AI agents and command-line tools using HTTP headers:

  • Accept header: Requests with Accept: text/markdown receive the markdown version of the page
  • User-agent detection: curl requests are treated like agent-style markdown fetches

Negotiation Rules

  • Root path: //llms.txt
  • Documentation pages: /{path}/{path}.md

Example Usage

# Open the source markdown directly with the page URL
curl https://your-site.com/docs/manual/en/ai/llms.md

# Get llms.txt from homepage
curl -H "Accept: text/markdown" https://your-site.com/

# Get llms.txt from a locale homepage (legacy i18n mode)
curl -H "Accept: text/markdown" https://your-site.com/en

# Get source markdown for a documentation page
curl -H "Accept: text/markdown" https://your-site.com/docs/manual/en/ai/llms

All these commands will return markdown content instead of HTML.

Check out the nuxt-llms documentation for more information about the module.
Copyright © 2026