Colm Troy
Back to blog

Rebuilding colmtroy.com with Astro

· 4 min read
astro cloudflare web development performance

After running my (severely neglected) personal site on WordPress for over 15 years, I decided it was time for a fresh start. The result is what you’re looking at now — a completely rebuilt site using modern web technologies.

The Tech Stack

Astro was an easy choice. It’s a static site generator that ships zero JavaScript by default, which means blazing fast page loads. For a content-focused site like this, it’s perfect.

For styling, I went with Tailwind CSS. I’ve been using Tailwind for years now and it’s become my go-to. The utility-first approach just clicks with how I think about CSS.

The content itself lives in Markdown files using Astro’s Content Collections. No database, no CMS — just files in a folder. Simple.

Hosting on Cloudflare Workers

The site is deployed to Cloudflare Workers, which is Cloudflare’s serverless platform. For a static site, this might seem like overkill, but there are real advantages:

  • Global edge deployment — your content is served from the nearest Cloudflare data center
  • Built-in HTTPS — no messing about with certificates
  • Excellent performance — sub-50ms response times worldwide
  • Free tier — generous enough for a personal site

Deployment is handled via Wrangler CLI. Push to GitHub, and Cloudflare automatically rebuilds and deploys. No manual FTP uploads like the old days!

Little Touches

The Deep Space Theme

I wanted something a bit different from the typical dark mode. The design is inspired by films like Interstellar and shows like For All Mankind — deep space blacks, subtle star fields, and warm amber accents. The star field is pure CSS, no images or JavaScript.

In light mode, everything flips to a clean, warm aesthetic. The theme respects your system preference but you can toggle it manually with the button in the header.

Performance Obsessed

Old habits die hard. I spent way too much time optimising:

  • System fonts — no external font requests
  • Lazy-loading YouTube embeds — videos show a thumbnail until you click to play, saving significant bandwidth
  • Google Analytics via Partytown — GA4 runs in a web worker, keeping the main thread clear
  • Zero layout shift — scrollbar-gutter and proper sizing prevent content from jumping around

The result? Lighthouse scores of 98-100 across the board.

SEO Done Right

Every page has proper Open Graph tags for social sharing, Twitter Card meta tags, and JSON-LD structured data for rich snippets. The sitemap is auto-generated, and there’s a proper robots.txt pointing search engines in the right direction.

Accessibility

The skip-to-content link is hidden until you press Tab — as it should be. All colour contrast ratios pass WCAG AA. Focus states are visible and consistent.

Migrating from WordPress

I had about 22 posts dating back to 2009. The migration involved:

  1. Exporting WordPress content to XML
  2. Writing a Node.js script to convert HTML to Markdown
  3. Fetching original-size images (WordPress exports only include the scaled versions)
  4. Converting internal links to the new URL structure
  5. Setting up 301 redirects in Cloudflare for the old URLs

The migration script ended up being quite involved, but it was satisfying to automate something that would’ve been tedious to do manually.

What’s Next?

For now, I’m happy with where things are. The site is fast, accessible, and easy to update. I can write posts in Markdown, push to GitHub, and everything just works.

If you’re thinking about moving away from WordPress for a personal site or blog, I’d highly recommend looking at Astro. The developer experience is excellent, and the performance gains are real.