<!-- Generated from llms-txt-docusaurus/index.html. The canonical document is the HTML page. -->

- [ Home ](/) 
/
- [ How to create llms.txt ](/how-to-create/) 
/
- Docusaurus            
# `llms.txt` in Docusaurus

Docs sites are prime candidates for llms.txt. In Docusaurus it is one file in static/.

Last updated: October 29, 2026

On this page

- [ Where the file goes ](#overview)
- [ Method: the static/ folder ](#static)
- [ Plugin option: docusaurus-plugin-llms ](#plugin)
- [ Watch out for baseUrl ](#baseurl)
- [ Verifying the setup ](#verify)             
## Where the file goes

Docusaurus copies everything in the `static/` directory to the root of the built site.
A file at `static/llms.txt` is served at `/llms.txt`. Because Docusaurus
powers documentation, an `llms.txt` that maps your key docs pages is especially valuable
to AI assistants.

Keep the file short and deliberate. Point assistants to overview pages, API references,
versioned docs, changelog and support policy rather than every sidebar entry. If the docs use a
non-root `baseUrl`, verify both the built path and the public URL before announcing
the file.

## Method: the static/ folder

- Add the file: `touch static/llms.txt` 
- List your most useful docs pages (see the [how-to guide](/how-to-create/)):   
```
# Your Project Docs

> Documentation for Your Project: guides, API reference, and tutorials.

## Guides

- [Getting started](https://yourdomain.com/docs/intro): installation and first steps.
- [Configuration](https://yourdomain.com/docs/config): all options explained.

## Reference

- [API reference](https://yourdomain.com/docs/api): full endpoint catalog.

```

- Build and deploy: `npm run build`.   
## Plugin option: docusaurus-plugin-llms

Docusaurus itself has no built-in `llms.txt` support: the official plugin list for the
current release (3.10.2) contains no such plugin. To generate the file from your docs, the
**community** plugin `docusaurus-plugin-llms` (version 0.6.1, published 2026-10-03)
is listed on the Docusaurus community resources page.

```
npm install docusaurus-plugin-llms --save-dev
```

```
// docusaurus.config.js
module.exports = {
// ... your existing Docusaurus config
plugins: [
'docusaurus-plugin-llms',
// ... your other plugins
],
};
```

With no options, the plugin reads the `docs` directory and, in its
`postBuild` hook, writes `build/llms.txt` (links) and
`build/llms-full.txt` (full content). Files are therefore produced by
`npm run build`, not by the dev server. Use either the plugin or a hand-written
`static/llms.txt`, not both.

## Watch out for baseUrl

Warning

Non-root baseUrl changes the path

If  docusaurus.config.js  sets a  baseUrl  other than  /  (common
for GitHub Pages project sites, e.g.  /my-project/ ), your file is served at
/my-project/llms.txt , not  /llms.txt . AI crawlers look for the file at
the domain root, so prefer a root  baseUrl  (a custom domain) or serve the file at the
true root via your host.

## Verifying the setup

```
curl -sI https://yourdomain.com/llms.txt | grep -i content-type
# expect: content-type: text/plain
```

Hosting docs on GitHub Pages? See the [GitHub Pages guide](/llms-txt-github-pages/) for
the root-path caveat. For a full-content variant, add
[`llms-full.txt`](/llms-full-txt/), then check both with the
[validator](/validator/).

## Sources

- [ Docusaurus docs, static assets ](https://docusaurus.io/docs/static-assets)
- [ Docusaurus docs, official plugins list ](https://docusaurus.io/docs/api/plugins)
- [ Docusaurus community resources (lists docusaurus-plugin-llms) ](https://docusaurus.io/community/resources)
- [ docusaurus-plugin-llms docs, installation ](https://rachfop.github.io/docusaurus-plugin-llms/docs/installation)
- [ npm, docusaurus-plugin-llms (0.6.1) ](https://www.npmjs.com/package/docusaurus-plugin-llms)
- [ npm, @docusaurus/core (3.10.2) ](https://www.npmjs.com/package/@docusaurus/core)
- [ llmstxt.org, spec reference ](https://llmstxt.org/)
