Zero JavaScript by default, content collections for scale, and islands only where you need interactivity.
Updated 6 min read
If you are choosing a framework for a content site that needs to be machine-readable, Astro is the straightforward answer. It ships static HTML by default and only sends JavaScript for components you explicitly mark as interactive.
Why it suits this problem
No hydration by default. A page with no islands ships zero JavaScript. Crawlers see complete HTML.
Content collections. Write pages as markdown with typed frontmatter; get type-safe access at build time. Fifty guide pages become fifty markdown files, not fifty components.
Islands where needed. A checker widget or a chart can be a React island on an otherwise static page.
set:html is the correct way to inject JSON-LD — it avoids Astro escaping the JSON.
Sitemap and robots
npx astro add sitemap
Set site in astro.config.mjs and the integration generates sitemap-index.xml at build. Put robots.txt and llms.txt in public/ and they are served from the root as plain files, which is exactly what you want.
Islands: the one rule
Use client:visible rather than client:load for anything below the fold, and never put content that must be crawlable inside an island. An island's markup is server-rendered too, but if the component fetches its content at runtime, that content does not exist at build time.
Deploying
Static output plus Azure Static Web Apps, Netlify or Cloudflare Pages. All three will serve public/llms.txt correctly with no configuration.
Share
Take this to your assistant
Paste it into ChatGPT, Copilot, Claude or Gemini and apply it to your own website.