Why Astro?
I recently decided to rebuild my personal website. My old Flask-based portfolio was simple, but adding features like a blog and project showcase would have required significant backend work. I wanted something that would let me focus on content rather than infrastructure.
After evaluating several options, I landed on Astro for a few key reasons:
- Zero JavaScript by default: My content loads fast because Astro ships only what’s needed
- Content collections: First-class support for managing markdown content with type safety
- Static output: Perfect for free hosting on Cloudflare Pages or similar platforms
- Framework agnostic: Can add interactive components with React, Vue, or Svelte when needed
The Migration Process
Moving from Flask to Astro was straightforward:
- Content: Moved my existing pages to
.astrofiles with layouts - Styling: Ported my CSS directly — no framework lock-in
- Collections: Set up content schemas for blog posts and projects
- Deployment: Replaced Flask’s server-side rendering with static builds
Content as Data
The biggest win has been treating my content as structured data. Each blog post and project is a markdown file with frontmatter:
---
title: "My Project"
description: "A brief overview"
pubDate: 2024-04-24
tags: ["astro", "react"]
---
Astro validates this against a TypeScript schema, giving me type safety for my content. No more runtime surprises.
What’s Next
I’m planning to add:
- RSS feed for the blog
- Search functionality
- More interactive project showcases
The foundation is solid, and I can incrementally add features as needed.