Skip to content

LLMs.txt Bundle

Build, dump and serve an llms.txt file from your Symfony application. The PrestaSitemapBundle way — listeners fill it, a controller serves it, a command dumps it.
Terminal window
composer require silarhi/llms-txt-bundle

Event driven

Listeners of LlmsTxtPopulateEvent add the links, from your repositories, like SitemapPopulateEvent.

Route options

Static pages join the file with an llms_txt route option, like the sitemap one.

On the fly or dumped

The controller serves the dumped file when there is one, and builds it otherwise.

Flat memory

Links added as generators are read one at a time, streamed to the response or the dumped file.

Spec compliant

H1 title, blockquote summary, H2 sections of links, the Optional section always last, escaped links.

Discovery

A <link> tag for the <head> of your pages and an opt-in Link header, through WebLink.