Leaflint: llms.txt generator & checker

llms.txt for GitHub Pages sites

GitHub Pages has two kinds of site, and they put llms.txt in different places.

User / org site Project site
Repo <owner>.github.io any repo
URL https://<owner>.github.io https://<owner>.github.io/<repositoryname>
Where llms.txt lives /llms.txt (root) /<repositoryname>/llms.txt
Source for the site types: GitHub Docs, What is GitHub Pages?

Why project sites used to be awkward, and why v2 fixes it

A project site can't publish to the host's root, so it can't publish /llms.txt or anything under /.well-known/. The v2 proposal names this exact case: "a GitHub Pages project site, for example, can publish files in its own directory but can never add one to the host's /.well-known/." And v1→v2 says the subpath rule "is also what lets a site that only controls a path, such as a GitHub Pages project site, participate fully." (llmstxt.org, changes) Under v2, /<repo>/llms.txt covers the pages under /<repo>/, and "where more than one file applies, agents should use the most specific one."

Steps

  1. Put llms.txt in the folder your Pages site publishes from (the repo root or /docs, whichever your publishing source uses).
  2. Use absolute links that include the repo path, e.g. https://<owner>.github.io/<repo>/guide.md.
  3. Optional (v2): help agents find it by adding <link rel="describedby" href="/<repo>/llms.txt"> to your pages' <head>.
  4. Push, wait for the Pages build, then open the URL.

Custom domain?

If you map a custom domain, a user/org site's file is at https://yourdomain/llms.txt (GitHub Docs covers custom domains; we didn't fetch the details). Lighthouse's audit only looks at the domain root (see /lighthouse-llms-txt), so a project-site file at /<repo>/llms.txt won't be what Lighthouse checks (inference, UNVERIFIED).

Looking for open-source generators on GitHub?

The proposal keeps a list of integrations, including vitepress-plugin-llms, docusaurus-plugin-llms and llms-txt-php (llmstxt.org, Integrations). We haven't tested them. Or use our in-browser generator and commit the output.

Check the deployed file: checker.


Leaflint is independent and isn't affiliated with, sponsored by or endorsed by any company, product or project named on this page. Names are used only to identify them; trademarks belong to their owners.

Guide draft: not indexed until Legal clears it.