Free AI visibility check. One page, all four dimensions. No signup, nothing installed. Check a page →
Home/Platforms

Platform guide

Astro

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.
Your platform Your content Structured data What a machine reads

The layout that carries your schema

---
const { title, description, updated } = Astro.props;
const url = new URL(Astro.url.pathname, Astro.site).href;
---
<head>
  <title>{title}</title>
  <meta name="description" content={description} />
  <link rel="canonical" href={url} />
  <script type="application/ld+json" set:html={JSON.stringify({
    "@context": "https://schema.org",
    "@type": "Article",
    headline: title,
    description,
    dateModified: updated,
    mainEntityOfPage: url
  })} />
</head>

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.

Take this to your assistant

Paste it into ChatGPT, Copilot, Claude or Gemini and apply it to your own website.

Nothing is sent anywhere. The text is copied to your clipboard.