Cette page est affichée en anglais. Une traduction française est en cours.
KnowledgeApr 3, 2026·2 min de lecture

Astro — Web Framework for Content-Driven Sites

Ship zero-JS by default. Island architecture for fast content sites, docs, and blogs. Supports React, Vue, Svelte. 58K+ stars.

Introduction

Astro is a web framework with 58,100+ GitHub stars for building fast, content-driven websites. Its key innovation is zero JavaScript by default — pages ship as pure HTML unless you explicitly opt into interactivity with "islands." This makes Astro sites blazingly fast (perfect Lighthouse scores) while still supporting React, Vue, Svelte, or any UI framework for interactive components. Astro powers documentation sites, blogs, marketing pages, and AI tool landing pages where performance and SEO matter most.

Works with: React, Vue, Svelte, Solid, Preact, Lit, any UI framework, Tailwind, MDX, Markdown. Best for content sites, documentation, blogs, and AI product landing pages. Setup time: under 2 minutes.


Astro Architecture

Island Architecture

Traditional SPA:        Astro Islands:
┌────────────────┐    ┌────────────────┐
│ ALL JavaScript  │    │ Static HTML    │
│ (200KB+)        │    │ (0KB JS)       │
│                 │    │   ┌────────┐  │
│                 │    │   │ Island │  │
│                 │    │   │ (5KB)  │  │
│                 │    │   └────────┘  │
└────────────────┘    └────────────────┘

Only interactive components ("islands") ship JavaScript. Everything else is static HTML.

Content Collections

// src/content/config.ts
import { defineCollection, z } from 'astro:content';

const docs = defineCollection({
    schema: z.object({
        title: z.string(),
        description: z.string(),
        category: z.enum(['guides', 'api', 'tutorials']),
    }),
});

export const collections = { docs };
<!-- src/content/docs/getting-started.md -->
---
title: Getting Started
description: Quick start guide for our AI tool
category: guides
---

# Getting Started
Install with: `pip install our-tool`

Multi-Framework Support

---
import ReactChart from '../components/Chart.jsx';
import VueForm from '../components/Form.vue';
import SvelteToggle from '../components/Toggle.svelte';
---

<!-- Mix frameworks on the same page -->
<ReactChart client:visible data={chartData} />
<VueForm client:load />
<SvelteToggle client:idle />

Hydration directives:

  • client:load — Hydrate immediately
  • client:visible — Hydrate when scrolled into view
  • client:idle — Hydrate when browser is idle
  • client:media — Hydrate on media query match

Performance

  • 100/100 Lighthouse score out of the box
  • Zero JS by default
  • Automatic image optimization
  • Built-in RSS feed generation
  • Sitemap generation

FAQ

Q: What is Astro? A: Astro is a web framework with 58,100+ GitHub stars that ships zero JavaScript by default using island architecture. Supports React, Vue, Svelte for interactive parts. Perfect for content sites, docs, and blogs.

Q: When should I use Astro vs Next.js? A: Use Astro for content-driven sites (docs, blogs, landing pages) where SEO and speed matter. Use Next.js for interactive web apps (dashboards, SaaS). Astro ships less JS; Next.js has better app-like features.

Q: Is Astro free? A: Yes, open-source under MIT license.


🙏

Source et remerciements

Created by Astro. Licensed under MIT.

astro — ⭐ 58,100+

Discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires