Moving to Astro - Part 1

Introduction

I’ve been using 11ty for a while on my personal blog, but I’ve never managed to convince my workplace to embrace it. Most of our static site generation at work is based on Gatsby or NextJS.

One issue I’ve encountered is that after a while, I completely forget my own configuration. Since most of the new additions are just markdown files in the blog folder, I rarely need to change the main project infrastructure.

In the past, I had some exposure to Astro but didn’t consider it for my blog. This year, I started a slow migration to a NextJS version, but since I only work on it in my limited free time, progress has been slow.

Then, I came across a post about using Astro for blogging and decided to give it a try. After a brief period of understanding its philosophy, I fell in love with it. It turned out to be a wise decision, as I got something working almost immediately with much less effort and tweaking than with NextJS.

Head-to-Head Comparison

FeatureAstro11ty
JavaScript HandlingZero JS by default, partial hydrationMinimal JS, but more manual control required
Component IntegrationSupports React, Vue, Svelte, etc.Primarily HTML/CSS with optional JS
TemplatingAstro componentsMultiple templating languages
PerformanceOptimized for performanceHighly performant, depends on implementation
ConfigurationModern, component-based setupSimple and flexible configuration
Use Case FlexibilityStatic and dynamic capabilitiesPrimarily static, can be extended
Community & EcosystemGrowing rapidly, modern toolingEstablished, large community, many plugins

Astro differentiates itself with a compelling proposition: delivering a web framework that emphasizes zero JavaScript by default, seamless integration with popular libraries, and a focus on static site generation. This makes Astro an ideal choice for developers looking to build performant, SEO-friendly websites without the overhead typically associated with JavaScript-heavy frameworks.

Given my background I feel more confortable using it instead of 11ty.

Published: May 21, 2024