Home
Customization

Context Exports

Every build emits llms.txt and llms-full.txt, agent-readable views of the same documentation graph.

Alongside the HTML output, sourcey build writes two plain-text context files following the llms.txt convention: a compact index and a full-text reference. They give agents, retrieval pipelines, and LLM tools a clean way to consume your documentation without scraping HTML.

No configuration is required. Both files are generated on every build.

Files

FileContents
llms.txtSite title and summary, then one section per tab with a link and one-line description for every page. API tabs also list each operation with a deep-link anchor. Ends with a changelog summary when the site has a changelog.
llms-full.txtThe full text of every page: title, public path, description, and body content with HTML stripped. API pages include operations with parameters, request bodies, and responses (or MCP output schemas). Generated Rust pages keep doctests as fenced code blocks so examples stay runnable.

Where they land

Both files are written to the root of the output directory:

dist/
  index.html
  ...
  llms.txt
  llms-full.txt
  search-index.json
  sitemap.xml

Deploy the directory as-is and they are served next to your pages, for example https://yourdocs.example/llms.txt. Links inside the files use the same public URL form as the rest of the site, following your baseUrl and prettyUrls settings.

Example

The start of this site's own llms.txt:

# Sourcey

> Sourcey tells the whole product story. Specs, code, rich guides, changelog, roadmap pages, examples, and portable context files from your project as static HTML.

## Documentation

- [Introduction](/docs/introduction): Sourcey tells the whole product story. Specs, code, rich guides, changelog, roadmap pages, examples, and portable context files from your project as static HTML.
- [Install](/docs/install): Every supported install path for Sourcey. npm, Homebrew, Docker, and Nix for the main CLI. Go, Homebrew, and Scoop for the standalone Go docs generator.

What goes in

Every tab type feeds the exports. Markdown pages contribute their full prose. OpenAPI and MCP tabs contribute operations, parameters, and schemas. Doxygen, godoc, and rustdoc tabs contribute their generated symbol pages. Changelog tabs contribute a version-by-version summary.

How they get consumed

  • Point an agent at your site's llms.txt for a navigable index; it follows the links for detail.
  • Feed llms-full.txt to retrieval pipelines as a single-file corpus. The LangChain retriever guide builds on exactly these files.
  • Paste either file into a model conversation when you want answers grounded in your docs.