Re-build with Astro
I was searching for a replacement for React Static and Astro just landed from the sky.
Decision ✅ All in
I have been playing with Astro for a while now and I am 🤩 confident this is the static site generator I have been waiting for.
Why
- My website's core metrics have been degrading over the last 3 years. Not acceptable anymore.
- React Static is in maintenance mode now, so I need to replace it with something more modern.
- Could use the opportunity to dream up some exciting new features.
- I need a holiday project.
Decision
Rebuild the site with Astro.
Astro is an all-in-one web framework for building fast, content-focused websites.
- ✅ (extensible) Markdown & MDX support
- ✅ Fully SSG first
- ✅ with opt-in, micro client side islands
- ✅ with opt-in route pre-fetching support
- ✅ 100/100 Lighthouse performance
- ✅ SEO-friendly with canonical URLs / OpenGraph
- ✅ Sitemap support
- ✅ RSS Feed support
Trade-offs
Astro core maintainers seem to be very focused on "easy to use" use cases and the "non typescript person" out there. I can totally empathise with that and wish the best of luck for them. Hopefully the opinionated parts of Astro don't get too much in the way of building a more bare bones experience. Hopefully I can tag along for a while.
Things that have me a bit concerned:
- 😦 querying for data is not terribly optimised. Let's see how this scales.
- 😢 coupling URL with file-structure.
- no (react) context available on SSG time - no miracles.
- embracing
cjs
means some older tools may not be compatible, but let's embrace the future
Other options considered
No serious contender.
Next.js SSG
In Next.js, SSG is an afterthought. And an advanced feature.
I already have to deal with this monster at work and I don't need the whole React stack for this web site, anyway, as I want to focus on content and IA, not interaction.
So, not dissing, Next.js is amazing and does the job well. At work.
Gatsby
Gatsby was already bloating 3 years ago. Plus, I still don't find the GraphQL indirection comfortable.
You’ll learn in this guide how Gatsby’s automatic GraphQL Typegen feature ...
No thanks.