Skip to content
Select theme

llms.txt in documentation generators

How to enable llms.txt in Starlight, VitePress, Docusaurus, MkDocs and Nuxt - a working setup for each, which files the plugin creates and what to check after the build

Generator Package llms.txt llms-full.txt Markdown versions of pages
Starlight starlight-llms-txt yes yes, plus llms-small.txt not stated
VitePress vitepress-plugin-llms yes yes yes
Docusaurus docusaurus-plugin-llms yes yes by option
Docusaurus @signalwire/docusaurus-plugin-llms-txt yes by option yes
MkDocs mkdocs-llmstxt yes by option for listed files
Nuxt nuxt-llms yes by option no
Окно терминала
pnpm add starlight-llms-txt
astro.config.mjs
import starlight from '@astrojs/starlight'
import { defineConfig } from 'astro/config'
import starlightLlmsTxt from 'starlight-llms-txt'
export default defineConfig({
site: 'https://example.com/',
integrations: [
starlight({
title: 'My Docs',
plugins: [starlightLlmsTxt()],
}),
],
})

The site field is required: without it the plugin cannot build absolute addresses. The output is three files: llms.txt, llms-full.txt and a shortened llms-small.txt.

Platform What is created automatically
Mintlify llms.txt and llms-full.txt at the project root; a very long index is split into parts
GitBook llms.txt, llms-full.txt and a Markdown version of any page at the address ending in .md

This explains why so many documentation sites have the files although their owners configured nothing.

Plugins create the files, but not all of them add the relations from the second edition of the proposal to pages. Check whether the page code has these lines:

<link rel="alternate" type="text/markdown" href="/docs/page.md">
<link rel="describedby" href="/llms.txt">

If not, add them through the page head template. More: Discovery of the file and Markdown versions.

  1. llms.txt appeared in the build folder and answers 200 on the site.
  2. It has the site name and summary.
  3. Link addresses are absolute and on the right domain.
  4. Drafts and hidden pages did not get into the file.
  5. The size of llms-full.txt is reasonable.
  6. Markdown versions of pages open, if the plugin creates them.

Commands for checking: Validating files and markup.