CASOON Open Source
Site meta files, generated from typed config.
@casoon/astro-site-files writes robots.txt, llms.txt, sitemap.xml, security.txt and humans.txt into the build output when astro build runs. This site generates its own.
npm install @casoon/astro-site-filespnpm add @casoon/astro-site-files# astro-site-files > Astro integration that generates robots.txt, llms.txt, sitemap.xml, security.txt and humans.txt at build time from typed configuration. Published on npm as @casoon/astro-site-files. Requires Node.js 22.12 or newer and Astro 6 or newer. MIT licensed. ## Documentation - [Installation](https://casoon.github.io/astro-site-files/docs/getting-started/installation/) - [Quickstart](https://casoon.github.io/astro-site-files/docs/getting-started/quickstart/) - [robots.txt](https://casoon.github.io/astro-site-files/docs/configuration/robots-txt/): Presets, bot groups and path rules - [llms.txt](https://casoon.github.io/astro-site-files/docs/configuration/llms-txt/) - [sitemap.xml](https://casoon.github.io/astro-site-files/docs/configuration/sitemap-xml/): Discovery, priorities, i18n and sources - [RSS feed](https://casoon.github.io/astro-site-files/docs/configuration/rss/) - [security.txt](https://casoon.github.io/astro-site-files/docs/configuration/security-txt/) - [humans.txt](https://casoon.github.io/astro-site-files/docs/configuration/humans-txt/) - [API overview](https://casoon.github.io/astro-site-files/docs/reference/api/) ## Project - [Source code](https://github.com/casoon/astro-site-files) - [npm package](https://www.npmjs.com/package/@casoon/astro-site-files) - [Changelog](https://casoon.github.io/astro-site-files/changelog/)
- file types written at build time
- 6
- crawlers in the built-in bot registry
- 25
- tests in the suite
- 139
- runtime dependencies
- 0
What it does
robots.txt from presets
Five presets from seoOnly to lockdown decide per bot group; single bots and whole groups can be overridden. Global rules are repeated in every allow group, because a crawler obeys only its most specific group.
Sitemap from the build output
Pages come from what Astro built. Redirect and noindex pages are dropped, hreflang alternates follow the Astro i18n config, and more than 50,000 URLs switch to a sitemap index.
Typed per file
Each file has its own options interface (RobotsOptions, LlmsOptions, SitemapOptions, SecurityOptions, HumansOptions), exported for your own config modules.
Audited during the build
15 audit rules report problems in the build log, among them an expired security.txt, a contact without URI scheme and legal pages blocked in robots.txt.
Generated at build time
All examples →/* TEAM */
Name: Jörn Seidel
Role: Author and maintainer
/* SITE LAST UPDATED */
2026-09-27
/* TECHNOLOGY COLOPHON */
Astro, TypeScript, @casoon/astro-site-files, @casoon/pages-theme
/* NOTE */
This file, robots.txt, llms.txt, sitemap.xml and security.txt are generated by @casoon/astro-site-files during the site build.
Generated by @casoon/astro-site-files while this site was built, from the configuration in site/src/site-files.ts. The showcase shows all five files.
dist/humans.txtQuickstart
Three steps from install to generated files. The full walkthrough lives in the documentation.
- Install the package and set
sitein your Astro config. - Add
siteFiles()tointegrationswith the files you want. - Run
astro build. The files are written todist/.
import { defineConfig } from 'astro/config'
import siteFiles from '@casoon/astro-site-files'
export default defineConfig({
site: 'https://example.com',
integrations: [
siteFiles({
robots: { preset: 'seoOnly' },
llms: { title: 'Example', description: 'An example website.' },
security: { contact: 'mailto:security@example.com', expires: '2027-03-01T00:00:00.000Z' },
humans: { team: [{ name: 'Alice', role: 'Development' }] },
}),
],
})