Why Astro.js is perfect for blogs, portfolios, and marketing sites. Learn the island architecture and build faster websites.
What is Astro?
Astro is a modern web framework that delivers lightning-fast performance by shipping zero JavaScript by default.
Key Features
#
Island Architecture
Components only hydrate when needed, reducing JavaScript payload.#
Framework Agnostic
Use React, Vue, Svelte, or vanilla JS together.#
Static Site Generation
Pre-render pages for optimal performance.Getting Started
npm create astro@latest
Building Components
---
const { title } = Astro.props;
---
{title}
Content Collections
Organize and validate your content:
import { defineCollection, z } from 'astro:content';const blog = defineCollection({
schema: z.object({
title: z.string(),
date: z.date()
})
});