Removing Next.js Got My Blog to 100 on Every Lighthouse Category (korindiehacker.bloffy.blog)
108 points by textlanes33 7 hours ago
pigbearpig 3 hours ago
Respectfully, I don't understand this. They never needed Next.js for a static blog.
This is like writing a post about how I didn't need a Ferrari to commute to work and I saved money by taking the bus.
vanderZwan an hour ago
I think we should blame the elders for teaching people new to the trade wrong.
Because "heavyweight SPA for a static blog" isn't exactly a rare problem.
littlecranky67 an hour ago
Next.js supports fully static export, so they should have went with that.
I run a dynamic website on nextjs static export - landingpages and docs are fully static, login and user dashboard use REST calls to a non-nextjs backend. Blazing fast, no nodejs or SSR in production.
onion2k 31 minutes ago
Next.js supports fully static export, so they should went with that.
Keeping an unnecessary dependency for legacy reasons is never a good move. Be bold and delete things. Your software will be better for it.
littlecranky67 23 minutes ago
cpursley 24 minutes ago
Astro blows away next.js for static sites, especially blogs.
littlecranky67 23 minutes ago
ogou 3 hours ago
The vast majority of websites don't need Next.js or React. Those are only useful if you need dynamic and modular updates within the structure, or state management. We've defaulted to React because of the name recognition and simple intertia. It's not a good framework for websites in general.
tempay 3 hours ago
I'm not convinced you need React/Next.js even in those cases. Web components work and LLMs are so capable of using them that I find there is increasingly little utility in big frameworks.
agos 16 minutes ago
Any web components solution is probably going to be as big as React
Exoristos 3 hours ago
Do tech influencers never tire of announcing their incompetency in their subject area?
s1n_ an hour ago
Seemingly not
4pkjai 4 hours ago
I wrote not so basic CRUD application that uses HTML and vanilla javascript. I don't even minify the javascript. That website loads significantly faster than all the other websites I have made.
smt88 4 hours ago
This is obvious and not an interesting observation.
The question is how to get a good and efficient dev experience while also preserving that level of speed.
AI has now made that question mostly irrelevant, since it can generate and rapidly edit vanilla webpages without a framework to make the DX better.
SwellJoe 4 hours ago
I use Hugo published to Github Pages for my blog. I've never thought about performance (it's Fast Enough™ when I visit it), but I just checked and it's 100 on pagespeed. The magic of a static HTML blog is you don't have to think about performance. An entire category of problem just disappears.
nullify88 2 hours ago
Hugo is great. I had Claude make the framework for my wifes site using Hugo, Netlify free tier, and Decap CMS. And I forced Claude to avoid any Javascript for the non CMS parts.
mceachen 4 hours ago
I use Hugo as well. If any of your pages have larger media, look into Pipes to get images ladder srcsets built for you automatically. Very fancy. https://gohugo.io/hugo-pipes/introduction/
stackghost 4 hours ago
What’s an image ladder src set?
mceachen 3 hours ago
ct520 4 hours ago
Same we moved from Wordpress to Hugo when looking to update our company site page. Using AI to update the legacy Wordpress theme just wasn’t it. Had updated brand and style guide, Claude made short work of porting to Hugo and Google speed rankings were excellent even without cdn etc
dzink 4 hours ago
I’ve been beating giants in SEO with a static site precompiled at deployment time through includes with Gulp. Plain vanilla JS and CSS.
sampli 3 hours ago
Nextjs can get you 100 if you use it properly. Like anything it’s just a tool that can increase complexity if you want it to
tkzed49 23 minutes ago
I have a next.js SSG blog that easily hits 100 and loads ~instantly. I just don't think there's any point trying to have a rational discussion about next on hn.
benmccann 4 hours ago
I got straight 100s using SvelteKit on https://c3.ventures
firefoxd 3 hours ago
Not to brag*, but that's what I've been doing since 2013 on my php blog [0]. It was actually the result of a hn warm hug of death. My CDN is just a separate webserver serving all static assets using nginx.
Both my css and js are dynamically minified and included in the html depending on which component is loaded on the page.
[0]: https://idiallo.com/blog/handling-1-million-web-request
* I am bragging
post-it 4 hours ago
We use nextjs at work and I hate it. Why write each view once when you could write it twice?
I'm open to the idea that we're doing it wrong and that there's a correct and pleasant way to write nextjs, but I think with the tools available today, everyone should just profile and optimize their app so they don't need to render it serverside.
chrisweekly 4 hours ago
I recommend ditching Next.js in favor of Tanstack Start^1, an alternative metaframework that gives you more freedom, better DX, and better defaults. Stick w the best aspects of SPAs and introduce SSR selectively if and when it makes sense.
cpursley 22 minutes ago
Or for a serious stack like Phoenix Liveview.
agos 13 minutes ago
chrisweekly 2 hours ago
I'd be grateful if whoever downvoted my comment could explain what they found objectionable.
littlecranky67 44 minutes ago
tengbretson 3 hours ago
Why are you writing the same view twice?
reassess_blind 3 hours ago
I feel like these large frameworks will slowly die out with the advent of agents.
The big selling point of them was a fast, convenient dev experience with many features (most often unused) being built-in.
Now, those built-in features are becoming a security risk as more vulnerabilities are being found in their 1000s of lines of code, and the developer experience benefit is being nullified by agents whittling away the human involvement anyway.
cpursley 2 hours ago
Sadly, the code LLM tools seem to default to the NextJS dumpsterfire stack.
reassess_blind 2 hours ago
Yeah, for now. I sense sentiment shifting against these frameworks lately, it might be reflected in their training in a few models time. Or, it’s possible I’m completely off the mark.
egeozcan an hour ago
aftbit 5 hours ago
What are the best static site generators for blogs these days?
arecsu 4 hours ago
I love Astro. It is so extensive to your liking and if you want to have complex interactive stuff at some point, you can just add a framework of your liking (react, vue, svelte, etc) and it will still work wonders. It doesn't abstract that much, and yet provides a nice UX and performance is top notch, which is why I love it so much. You can do from the most simplest website and blog on it, to the most complex content driven websites. I use it for so many different things, both hobbyist and professionally.
stackghost 4 hours ago
Astro is based on npm is it not? Given the state of that ecosystem and the rate at which new vulnerabilities are being discovered these days, I prefer to stay as far away from Node as I can.
moi2388 an hour ago
esperent 4 hours ago
I'm going to push back against Astro because all the server island stuff is over-engineered for a blog, while in the meantime Astro is not designed for more complex sites so I'm not sure what it's purpose is really.
I would say that in the era of agentic coding you don't need any framework. Just a backend + router + markdown generator. I use Hono + Tanstack router for the first two. Tell any decent LLM to wire those up for you and you'll have a simple static site ready to go in an hour or two.
woutr_be 3 hours ago
The server islands are completely optional tho, if you don’t want to use them, you don’t have to. For a simple blog you can just use collections, and plain HTML/CSS.
I’ve used Astro for more complex applications, and it’s perfectly suitable for that too.
Of course, if you’re building an SPA, then it’s probably not the best choice.
chrisweekly 4 hours ago
+1 for TanStack Router (and TanStack Start if your needs evolve to merit a metaframework).
abound 4 hours ago
I use Hugo for one blog [1] and Zola for another [2], I think they're both pretty simple to use once you wrap your mind around how they structure things.
Astro is also great (as others have noted) esp if you want to leverage the JS ecosystem at large.
dotnetcarpenter 4 hours ago
Astro https://astro.build/
jazzypants 4 hours ago
Astro is fantastic.
danpalmer 4 hours ago
I'm on Hugo. It's simple, capable, well documented, LLMs understand it well, and I don't have to touch the JS ecosystem. My previous setup was with a Node based SSG and it broke on literally every update and had a hundred dependencies.
vunderba 3 hours ago
I've been using Astro for my main blog and have been reasonably happy with it, but recently branched out for my Lab site to be just a simple static hub built with Vite/TypeScript/Tailwind, where each project subpage is bundled in its own slug folder so they can bring in additional dependencies.
analog_daddy 4 hours ago
Not sure about the best, but Zola is good enough for basic blogging needs. I liked the part that it was a single binary, so you don’t have to keep up with any breaking changes unless you want a new feature or a bug is bothering you.
Whatever you use, I feel it is tradition to have 3 odd blog posts about journey of building a SSG of your own since nothing else matched exactly what you needed and that’s it. Then you should forget that blog ever existed.
ovrnightr 3 hours ago
I'm not a blogger, but I run multiple blogs.
OuterVale 4 hours ago
So many great options. I always opt for Web Origami though.
It is more like a dialect of JavaScript optimised for developing static sites than a static site generator in and of itself. It has lots of 'builtins' for things like RSS and converting Markdown to HTML. It is so wonderfully flexible and doesn't lock you into a specific site structure like others SSGs do.
burntcaramel 4 hours ago
I made QIP Router where every part of rendering and making the HTTP response is customizable via WebAssembly. You often have a lot more control than a traditional static site generator that requires a particular plugin made — just make your own!
jddecker 3 hours ago
I like Zola. It is opinionated, but easy to pick up and get running in an hour or so. Not so great if you are working on a large website with lots of interconnected pages, but perfect for a blog, personal, or small company website.
hutusi 4 hours ago
I created a static blog framework called Amytis: https://github.com/hutusi/amytis and I'm really excited for you to give it a try.
ErenayDev 4 hours ago
I use Zine [1]. its inspired from Hugo, written in Zig. but probably not the "best" for some use cases.
verdverm 4 hours ago
I'm using tanstack+tailwind and Ai to write a few scripts for doing what static generators would do. Keep it simple, make it unique, bring back the weird
7777777phil 4 hours ago
I love using hugo. Also wrote about some time ago how I got a perfect 100/100 Lighthouse score with Hugo and plain CSS. Feel free to have a look: https://philippdubach.com/posts/hugo-lighthouse-100/
slopinthebag 4 hours ago
ai. like have them take your language of choice, your templating of choice, your architecture of choice etc and spit out something. they've seen enough that it can pretty much oneshot something relatively simple.
edit: i mean have the ai write the generator, don't use it to actually generate pages...
brlewis 4 hours ago
This is the right answer to the vague question of "best".
I started with an empty repo, wrote the first half of a README describing my decision-making process in choosing a static site generator, and conversed with an AI to finish the decision and set everything up.
altmanaltman 3 hours ago
It's pretty easy to get 100 on every lighthouse category even while using next. The scoring is based on how fast a page loads and what blocks its loading time. If you develop it with a bit of care, that is a non-issue. My funny agency website (https://www.pixlw.com/) is purely nextjs and it scores a 100 on Lighthouse as well because I kept working on it till it didn't.
LoganDark 4 hours ago
Caching isn't essential if you can come up with the pages fast enough, unless you need a CDN due to factors like distance.
nickphx 42 minutes ago
Water is wet. Amazing.