django-icv-sitemaps generates discovery files rather than serving them on the fly: sitemap.xml, robots.txt, llms.txt, and security.txt all come from database records, a SitemapSection and its SitemapFile rows for the XML, plus dedicated render services for the plain-text files, written to storage by a management command rather than rebuilt on every request.
Each SitemapSection tracks its own staleness independently, with a last_generated_at timestamp and an is_stale flag, so a site with many URL sources can regenerate only the sections that changed instead of the whole sitemap on every edit. The raw-file viewer on the main demo page reads this site's own generated files verbatim, not a hand-written sample.
robots.txt is not purely generated text either: it merges database-driven crawl rules with settings, including the sitemap's own URL, so crawlers discover the sitemap automatically without a manually maintained entry.