
Astro 4 Has a Free API — Content-Driven Sites with Zero JavaScript by Default
Astro is the web framework for content-driven websites. It ships zero JavaScript by default, supports React/Vue/Svelte components, and has the best performance scores of any framework. Why Astro? Zero JS by default — HTML-first, JS only where you need it Islands architecture — hydrate only interactive components Any UI framework — React, Vue, Svelte, Solid — mix and match Content Collections — type-safe Markdown/MDX content layer Quick Start npm create astro@latest mysite cd mysite npm run dev Pages --- // src/pages/index.astro const title = 'My Site'; const posts = await fetch('https://api.example.com/posts').then(r => r.json()); --- <html> <head><title>{title}</title></head> <body> <h1>{title}</h1> <ul> {posts.map(post => ( <li><a href={`/posts/${post.slug}`}>{post.title}</a></li> ))} </ul> </body> </html> Content Collections // src/content/config.ts import { defineCollection , z } from ' astro:content ' ; const blog = defineCollection ({ type : ' content ' , schema : z . object ({ t
Continue reading on Dev.to Tutorial
Opens in a new tab



