Hacker News
Removing Next.js Got My Blog to 100 on Every Lighthouse Category
SoftwareFirst seen 95 points47 comments
A developer built a fast, simple blog and got a perfect 100 score on every Lighthouse category. To do it, they dropped Next.js, a popular tool for building websites.
A perfect score after a hard rebuild
The author built their own blog because they wanted it to be light, fast, free of clutter, able to run many blogs, and easy to use for all readers. After a tough process, they reached 100 on every Lighthouse category. Part of the work meant removing Next.js, the framework they had used most. The author says this was much harder than they expected.
Why not use an existing blog tool?
The author did not like Medium or Blogger because they have too many features and are slow. WordPress has too many plugins. Ghost must be self-hosted or costs a lot on its hosted plan, and its updates often broke the editor. Hugo is fast but takes work to set up. Bear Blog is fast and simple, but the author found it too minimal and its editor hard to use. The author wanted something as fast as Bear Blog with a bit more features.
Caching and the CDN
Caching saves a copy of a page so it does not have to be built again each time. Next.js makes caching easy. But visitors from far away still wait longer because data must travel farther. A CDN (content delivery network) stores copies of the site in many places around the world. Vercel gives a CDN with Next.js, but its paid plan is costly. Cloudflare is another CDN option. The author decided that for a static website, a CDN alone is enough, so Next.js caching was not needed.
Key facts from the article
- The blog scored 100 on every Lighthouse category.
- Performance was measured with pagespeed.web.dev.
- Some images today can be over 10 MB.
- Next.js caching meant two caches had to be cleared on every new post.
Why this matters
Many people think a big framework is needed for a modern site. This story shows that a simple static site with a CDN can be very fast. Fast pages help readers and can help search rankings. The author also shows that tools have trade-offs in cost, setup, and control.
Glossary
- Lighthouse
- A free tool from Google that scores a website on speed, accessibility, and other areas.
- Next.js
- A framework, or toolkit, for building websites with React code.
- CDN
- A network of servers around the world that store copies of a site so it loads faster for visitors.
- Caching
- Saving a copy of a page or data so it does not need to be made again each time.
- Bear Blog
- A simple, fast blog service known for minimal design.
- Vercel
- A company that hosts websites and apps, often used with Next.js.