I remember going down a day long rabbit hole to understand why, and it boiled down to content layer, MDX and NextJS using different, incompatible module loaders, bundlers or transpilers of some kind[1][2][3]. Ridiculous. And don’t get me started on the image component.
In the end, Astro just works. No need for React (unless you want it), it’s simple, fast and produces a static site you can use without JavaScript.
Data fetching is also utterly trivial, so you can have a fully static site with “live” data pulled in at compile time.
I recommend it to anyone with frontend fatigue.
1. https://stackoverflow.com/questions/63957018/how-to-use-imag...
2. https://mmazzarolo.com/blog/2023-07-30-nextjs-mdx-image-sour...
3. https://github.com/contentlayerdev/contentlayer/issues/11
- create a simple html template using simple.css [0]
- write markdown files
- wrap pandoc [1] in a simple bash script to manually convert markdown to html
- and that's it.
By minimalist, I mean: no script, no component, no database, no react, no SEO.
The result is a minimalist website that you write in markdown.
It's very limited compared to full-featured frameworks, but it can do the job for a simple website.
Here is mine: [2] (I'm not a web developer at all).
Astro really is quite wondrous. If you don't stray too far from its opinionated route, it's almost magical. But some more advanced things do still take some tinkering. My sitemap and RSS with full text setups I wouldn't describe as the most elegant things in existence, but they do their job.
What I'm still lacking/wondering about is whether there's a CDN static site/serverless hosting provider like Netlify, Vercel or Cloudflare, but that isn't free or $20/mo. I'd like to pay for a good service that obviously has running costs, but I don't believe there's quite something like those.
Anyway, I like the website. It's easy on the eyes.
I ended up using 11ty because I wanted to stick as close to the web platform as possible, but a part of me wishes I had tried Astro as well. Mainly because I feel that it strikes the right balance when it comes to flexibility and boilerplate. 11ty is lovely, but there was soooo much stuff I had to write from scratch. I feel like it paid off, but it took me much longer than I had hoped.
One surprising side effect: I noticed that the site worked faster online than served from localhost. 5 minutes of digging after I remembered that it's served via HTTP2 w. multiplexing. I'm not even interested in adding a bundler/minify step, just plain CSS/HTML and asset optimisation w. 11ty-image is enough.
In early experiments it feels like Inertia.js be this same feeling but for Rails and Laravel.
I never got very far on the Gatsby train. It always felt so slow and fragile during local dev, and while GraphQL was cool it felt like total overkill for most of the data I needed to grab (like… markdown files from disk).
Astro is MPA while Gatsby provided SPA-like navigation.
That's why Astro is not really a replacement.
In comparison to Ruby on Rails, Django, and Laravel, Astro stands on the same level but much less learning curve.
It’s very easy to build a static website with zero js, or pick the desired framework you want to work with.
Pair it with TypeScript and you get almost 100% type safe templating and resulting websites.
So...a website. weary emoji
The author also complains that:
> I couldn’t build the site locally or upgrade dependencies, leaving it outdated since 2019
This is true of many things in the javascript ecosystem. In react/node/js-land you HAVE to invest in maintenance (and re-writes) or be left with a legacy codebase that just might not work one day if npm install fails.
They rode the highs - being the default docs tool for React, and building a massive ecosystem of integrations you could install out of the box. But too many abstractions, divided goals between cloud and OSS, and the better stewardship/design of Nextjs brought it down.
There were the simple lessons (https://swyx.io/a-world-without-plugins-cig). its easy to say in hindsight that graphql was too much for gatsby. i also believe the company went too hard for number of integrations over quality of them, an issue I had even in my interview. this was a poorer expression of the better insight that seb markbage had; just have a small api surface area bro (https://www.youtube.com/watch?v=4anAwXYqLG8)
But the bigger lesson is bitterer. Frontend tooling isnt worth that much. the fact that vercel is pretty much the only successful frontend startup of its generation makes it an exception to the rule (there are plenty of smaller companies that are thriving, like tailwind, but it is not a venture scale startup and thats fine). People dont pay for frontend tooling. they expect it to be free, expect it to do everything, get into internicine squabbles between frameworks when they are all basically doomed compared to just betting on React sponsored by Facebook and now Vercel (and a little bit of Shopify), or going back to fullstack frameworks like Django/Rails/Laravel. all frontend tooling, nextjs included, is just leadgen, loss leaders, while investors/salespeople patiently wait until you "grow up" by... building cloud backend/ci/cd services.
5 years ago i wrote about the "frontend ceiling" for individual developer careers (https://x.com/swyx/status/1682748872047886337) - i fear this is the "frontend ceiling" for companies.
I deeply admire Astro and hope they figure out a way to break the ceiling. Their recent cloud products have been encouraging.