Static Site Generators Icon

Static Site Generators

Jekyll, Hugo, Gatsby, and anything that generates a static site from a set of inputs.
9 Stories
All Topics

Rust github.com

A tiny, full-text search engine for static sites built with Rust and WASM

A Rust/WASM port of the Python code from the article “Writing a full-text search engine using Bloom filters”. This can be seen as an alternative to lunr.js and elasticlunr.

The idea is to generate a small, self-contained WASM module from a list of articles on your website and ship it to browsers. tinysearch can be integrated into the build process of generators like Jekyll, Hugo, zola, or Cobalt.

Kick the tires on the author’s blog.

GraphQL github.com

Mordred brings Gatsby's "source data from anywhere" idea to the rest of us

One of Gatsby’s greatest virtues is how it normalizes all data sources through its source plugin architecture. This is cool because it gives you a unified access layer for everything from the file system to 3rd-party APIs to headless CMSes.

Kevin Titor must’ve liked the idea enough that he’s bringing it to other frameworks that support static site generation (Next.js, Nuxt.js, Eleventy, etc.). The main thing missing from Mordred is a community creating plugins for popular CMSes and services; a great way to get involved!

Marco Otte-Witte simplabs.com

How to over-engineer a static page

Marco Otte-Witte:

When we set out to rebuild our own website simplabs.com in 2019, we wanted to use that project as an opportunity to ignore all economic considerations (and reason you could say) and dive deep into what was technically possible. Doing so would allow us to build something that was super customized for our specific needs and highly optimized for performance. We ended up spending a lot of time and effort but are quite pleased with the result.

While we cannot recommend anyone following our example as your time is most likely better spent elsewhere, this post explains the approach we took. I will be covering topics like static pre-rendering and client-side rehydration, advanced bundling and caching strategies as well as service workers.

Highlights added by me because this is a fun read (and no doubt a fun experiment for them), but I also cannot recommend you follow their example. 😉

JavaScript github.com

A Next.js site demonstrating SSG support with a Notion-backed blog

I’m not sure which is more interesting: the fact that Next.js is getting in to the static-site generation game or the fact that Notion is becoming popular enough amongst devs that people would use it as a back-end for their blog.

The Notion aspect, while interesting, comes with a big disclaimer:

since it is using a private API and experimental features, use at your own risk as these things could change at any moment.

Go github.com

A static website "generator" that lets you use servers and frameworks you already know

The scare quotes around generator are there because Staticgen doesn’t actually generate a static site for you. Instead, it downloads your dynamic site and produces a static version of it. A slightly new twist on an old idea:

If you’re unfamiliar, you can actually use the decades-old wget command to output a static website from a dynamic one, this project is purpose-built for the same idea, letting your team to use whatever HTTP servers and frameworks you’re already familiar with, in any language.

It is not without its caveats (no JavaScript rendering is a big one), but this could be useful in many circumstances you may find yourself in.

Sara Soueidan sarasoueidan.com

Migrating from Jekyll and GitHub Pages to Hugo and Netlify

Sara Soueidan:

My site is relatively small, I’d say. I have less than 100 blog posts. Less than 60 at the time of writing of this article, actually. And only a few static pages. I don’t use heavy JavaScript. In fact, I barely need to use any JavaScript. And yet, Jekyll still choked every time it had to compile it.

I’ve seen more and more people jump ship from Jekyll due to performance. Paul Robert Lloyd migrated over to Eleventy, even I’m contemplating something else. Interestingly enough, the static site generator comparisons mostly have to do with developer ergonomics because they all essentially do the same thing: output static HTML.

0:00 / 0:00