Hello! Fancy seeing you here 😉. For my first post, I thought I’d give a brief look at the tech I’m using to build my new website. I settled on using Astro, an awesome tool that’s a relative newcomer to the JavaScript framework land. (then again, what JS framework isn’t a newcomer these days??)
The ‘finalists’ were Astro and Hugo. I liked a lot of things about Hugo, like how quickly you can get up and running with a fully fledged website, as well as the awesome templates created by their community. But Hugo is written in Go and relies on Go templating for customization, and I decided I really wanted to stay within the JavaScript ecosystem. Fractured and chaotic as JS can be, it’s familiar chaos to me at this point 😄.
A few things I like about Astro:
- Astro ships with ‘zero JavaScript’ by default, but supports importing dynamic, interactive components through its islands architecture, which may come in handy when I want to show off something I’m working on. The super cool thing is that this supports multiple frameworks, so you can bring in your components from React/Svelte/Vue/Solid and more!
- It supports Markdown and MDX files, which is great for blogs and other content-driven sites.
- It comes with scoped CSS out of the box, which makes styling quite simple.
- They recently released their v3.0, which comes with neat features like image optimization and support for the View Transitions API (which you can see in action on this site 😎).
As with any framework, there are trade-offs: Astro is better suited for static rather than highly dynamic web apps, and they even explicity say so on their website. For now, I’m happy with the trade-offs: Astro manages to provide a lot of tools to build your site quickly, while staying ‘out of the way’ to build it the way you want. And the support for other framework components through ‘islands’ opens lots of possibilities for cool things… more to come!