Hello world
In the world of programming, the first thing you write is a “Hello, World!” program.
In the world of blogging, the first thing you write is a post detailing the technology that powers your blog—then you never post again 😆.
In the spirit of keeping with tradition, let’s take a look at what powers this website.
The tech
For this site, we took a JAMStack approach: markdown, templates, and data go through a static site generator and end up as static files deployed to a URL.
The site is entirely under version control. Post authors, site developers, and other contributors all use a Git-based workflow (like many other projects at SageSure). On push, our Gitlab instance has CI/CD to run a build and deploy the site to an s3 bucket. Changes pushed to main
go straight to prod, while preview deploys are created at unique URLs for each branch.
Now, to answer the question everyone is asking: what static site generator are you using? We decided to give Astro a shot. It’s the new kid on the block that merges a variety of ideas and approaches pioneered by the other popular static site generators and front-end frameworks.
What’s compelling about Astro is that it takes an approach of “no JavaScript shipped to the client” by default. In a way, it’s all the benefits of a modern front-end developer experience without passing on a lot of the cost of that experience to the client.
Astro: first impressions
It’s worth noting that, at the time of this writing, Astro is still very much in the early stages—not yet to v1. And with their own custom file format (.astro
) we’re still waiting for prettier support to get the ever-so-nice “format on save” functionality.
However, as I found, they do have a discord with friendly folks providing the most up-to-date info you could want. It’s a wholesome Github and Discord community—an incredibly valuable asset for a young project with lots of kinks yet to be ironed out.
For me personally, my experience with Astro thus far pretty closely mirrors what Robin Rendle described in his post detailing his attempt to switch from Eleventy to Astro. First, things are changing beneath your feet:
A ton of breaking changes had been made since I updated the version of Astro I was on.
And I only started this project a few weeks ago!
Through the course of building this website alone, I went from astro@0.16
to astro@0.20
. Fortunately, I wasn’t doing anything sophisticated enough to merit breakage (at least that I know of 😬). In fact, bumping versions actually fixed a few minor bugs I’d noticed and meant to investigate but the Astro folks got to them first fortunately!
With that in mind, set your expectations accordingly! If you’re mad about APIs shifting under your feet, you probably shouldn’t be building anything on software versioned at 0.x.x
. However, to be sympathetic, it’s one thing to know things are going to be changing and set your expectations accordingly, and it’s quite another to actually experience the frustration of it and realize “maybe I wasn’t as prepared for this as I thought!”
Astro: glass half full perspective
Chris Coyier writes about why he’s bullish on Astro, boiling it down to two major advantages:
- The JAMstack approach (static HTML/CSS/JS with a no-JS by default approach)
- Componentization
Regardless of its status as beta software, both of these advantages shine in Astro right out of the gate. As Chris stated, Astro has a vibe of “we’re gonna steal every last good idea we can from what came before, and lean on what the native web does best”.
If you’re worried about adopting something so earlier, don’t. Basic static use cases like a blog could be ported to another static site generator without too much hassle—its merely templates, markdown files, and static assets.
One last thing…
Don’t miss our RSS feed for this blog—why would you read a blog any other way?