Adding llms.txt to a static site generator
Published:
Static site generators have a folder whose contents are copied verbatim to your published site root — so adding an llms.txt is just dropping the file in the right place and rebuilding.
Where the file goes, per generator
- Astro —
public/llms.txt(everything inpublic/is served from the root). - Hugo —
static/llms.txt(thestatic/directory is copied to the output root). A custom output format also works for generating it. - Eleventy (11ty) — add a passthrough copy, e.g.
eleventyConfig.addPassthroughCopy("llms.txt"), so the file lands in the output. - Jekyll — put
llms.txtin the project root; Jekyll copies static files through to_siteas-is.
Build and verify
Run your build (astro build, hugo, npx @11ty/eleventy, jekyll build) and confirm llms.txt appears at the root of the output directory, then deploy.
Generate it from your content (optional)
For docs-style sites, plugins exist (for Astro Starlight, Docusaurus, MkDocs, VitePress and others) that build the file from your pages automatically. Handy when content changes often — but keep the output curated.
Validate
Paste your domain into the validator to confirm the file is reachable as plain text and every linked URL resolves.