Transitioning to Astro

astro web development

Right on schedule, another platform transition post. It’s been about ten years since I moved from Blogofile to Hugo, and twenty years since this blog started on WordPress. At this rate, I’ll be writing about whatever comes after Astro sometime around 2036.

Hugo served me well. It’s fast, it’s simple, and it just works. But I wanted something with a bit more flexibility for the homepage, and I’d been hearing good things about Astro from the React/frontend crowd. The pitch is compelling: ship zero JavaScript by default, but use whatever framework you want when you need interactivity.

The migration was surprisingly painless. All 144 posts came over with their frontmatter intact. The only real work was building out the new layouts and getting the date-based URLs to match the old format. Astro’s content collections made the blog setup trivial:

const posts = await getCollection('blog');
return posts.map((post) => {
  const date = post.data.date;
  return {
    params: {
      slug: `${date.getFullYear()}/${String(date.getMonth() + 1).padStart(2, '0')}/${String(date.getDate()).padStart(2, '0')}/${post.slug}`
    },
    props: { post },
  };
});

The design is inspired by Dieter Rams and Swiss typography. Black, white, and a single red accent color. I spent way too much time looking at Braun product catalogs and old Systems 14 calendars, but the result feels right. No gradients, no rounded corners, just clean lines and good type.

The site still deploys to S3 with CloudFront in front, now via GitHub Actions instead of a shell script. Push to master, wait a minute, done.

I’m genuinely impressed with Astro. The developer experience is excellent, the build times are fast, and the output is lean. We’ll see if it holds up for another decade.

If you’re reading this via RSS, congrats on still subscribing after all these years.