Home Projects Blog About Contact
Download CV
Back to Blog

Getting Started with Astro: The Modern Web Framework

A comprehensive guide to building fast, content-focused websites with Astro — the framework that ships zero JavaScript by default.

Getting Started with Astro: The Modern Web Framework

Building modern websites has never been easier. Astro is a web framework designed for speed and simplicity, letting you build content-rich websites with your favorite UI components while shipping zero JavaScript by default.

Why Astro?

Unlike traditional SPAs that load heavy JavaScript bundles, Astro takes a fundamentally different approach:

  • Island Architecture — Interactive components hydrate independently
  • Zero JS by default — Pages render to static HTML unless you opt-in to client-side JS
  • Framework agnostic — Use React, Vue, Svelte, or plain HTML
  • Content Collections — Type-safe Markdown and MDX support

Quick Setup

Getting started takes just one command:

npm create astro@latest

This scaffolds a new project with everything you need. The development server starts instantly:

npm run dev

The Power of Content Collections

One of Astro’s killer features is Content Collections. They let you organize your Markdown/MDX content with type-safe frontmatter:

import { defineCollection, z } from 'astro:content';

const blog = defineCollection({
  schema: z.object({
    title: z.string(),
    description: z.string(),
    pubDate: z.coerce.date(),
    heroImage: z.string().optional(),
  }),
});

Content Collections give you auto-completion, validation, and type safety for all your content. It’s a game-changer for content-heavy sites.

Performance That Speaks for Itself

Astro sites consistently score 100/100 on Lighthouse because:

  1. Pages are pre-rendered to static HTML
  2. No unnecessary JavaScript is shipped
  3. Images are automatically optimized
  4. CSS is scoped and minified
MetricScore
Performance100
Accessibility100
Best Practices100
SEO100

Conclusion

If you’re building a portfolio, blog, documentation site, or any content-focused website, Astro is an excellent choice. It combines the developer experience of modern frameworks with the performance of static HTML.

Start building with Astro today — your users (and Lighthouse scores) will thank you.