Registries are auto-generated files (sitemap, feeds, indexes) built
from page metadata. Pages opt in by listing registry names in their
register: front matter. Registry templates in
lazysite/templates/registries/ define the output format.
In page front matter:
---
title: My Page
register:
- sitemap.xml
- llms.txt
---
When any page is rendered, lazysite checks if any registry output file
is missing or older than the registry TTL (14400 seconds / 4 hours by
default). If so, it scans all .md files under the docroot, collects
pages with register: front matter, and renders each registry template
with the matching pages.
Templates are TT files in lazysite/templates/registries/. The
template filename (minus .tt) becomes the output filename in the
docroot. For example, sitemap.xml.tt generates sitemap.xml.
Available variables in registry templates:
pages - array of registered pages, each with:
url, title, subtitle, date, registerlazysite.confCreate a .tt file in lazysite/templates/registries/:
[% FOREACH page IN pages %]
[% page.url %] - [% page.title %]
[% END %]
Then add the registry name (filename without .tt) to pages that
should be included.
---
title: About Us
register:
- sitemap.xml
- llms.txt
- feed.rss
---
.md files are scanned for registration - .url files are
skipped (reading remote content for registration is too expensive)register: value names are matched against the template filename
minus the .tt extension