NAME

byterazor::HiD::LLMS - llms.txt generator

VERSION

version 0.1.0

DESCRIPTION

This Generator produces a llms.txt for your site, following the llms.txt specification -- a markdown-formatted index of your site's pages and posts, designed to be read by large language models instead of raw HTML.

By default a companion llms-full.txt is produced as well, containing the full markdown content of every page and post, as recommended by the specification.

Enable it by adding +byterazor::HiD::LLMS to the plugins key in your config. The + prefix tells HiD to use the full class name rather than looking in the HiD::Generator:: namespace:

plugins:
  - '+byterazor::HiD::LLMS'
llms:
  generate: 1

You may set the following additional llms.* config keys:

llms.title

The site title used as the # heading of the file. Falls back to the site-wide title config key. A warning is emitted and a placeholder is used if neither is set.

llms.description

A one-line site description, emitted as a blockquote below the title. Falls back to the site-wide description config key. Omitted if neither is set.

llms.destination

Where to write the llms.txt, relative to the site destination. Defaults to llms.txt.

llms.full

Whether to also generate llms-full.txt with the full markdown content of every page and post. Defaults to 1. Set to 0 to omit.

llms.full_destination

Where to write the full file, relative to the site destination. Defaults to llms-full.txt.

llms.baseurl

Absolute base URL of the site, prefixed to every entry. Falls back to the site-wide baseurl config key. The file is most useful with absolute URLs, so you should set this (a warning is emitted otherwise).

llms.exclude

Arrayref of regexes; URLs matching any of them are left out of both files.

Entries in the Pages section are listed in URL order; entries in the Posts section are listed newest-first by post date.

Each entry's link text is the post title for posts, the title front-matter for pages (or a title derived from the URL if none is given). A description, taken from the description front-matter, is appended after the colon when present.

METHODS

generate

_entry

Builds an entry hashref (url, title, description, content) for one page or post.

_derive_title

Derives a human-readable title from a URL: the last path segment without extension (dropping a trailing 'index'), dashes/underscores turned into spaces, first letter uppercased. The site root yields 'Home'.

_render

Renders the sections as a llms.txt document.

_render_full

Renders the sections as a llms-full.txt document: the full markdown content of every entry, each under its own ## heading.

AUTHOR

Dominik Meyer <dmeyer@federationhq.de>

COPYRIGHT AND LICENSE

This software is copyright (c) 2026 by Dominik Meyer.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.