Static Site Generators

You may not have noticed but static HTML is taking back the web

We all thought the days of static HTML websites were long gone when almighty server-side content management systems developed. With their powerful architecture and databases, often requiring licence fees and a few dedicated GB of RAM on your web server, why wouldn’t bigger be better? It turns out it’s not.

We got it wrong

  • Static HTML files are fast, no need for in-memory caching.
  • Static HTML files are secure, there’s much less to try to hack.
  • Static HTML files JUST WORK on virtually any hosting environment.

OK, so what are we supposed to do, go back to coding like it’s 1995? Managing common HTML between pages, sitemaps and “last updated” dates manually? Forgetting about new shiny technology like SASS and LESS, JADE and HAML? Not quite.

Enter the Static Site Generator

A Static Site Generator is a program which generates and outputs static HTML. The idea is that all the hard work is done upfront, so the user doesn’t have to do the waiting. Think of it as extreme caching :)

Many generators already exist for personal sites, blogs and reference sites etc, and are available for pretty much every language/platform you can imagine. You don’t have to use one off the shelf, they’re pretty easy to put together (hence there being quite a few). It’s also easy to get it working exactly how is best for you and your specific project.

I wrote a bespoke static site generator for a client earlier this year, which ingested a source atom feed and translated the data to HTML5 and RDFa using C# (wasn’t my language of choice but I was constrained by internal politics, I was just happy to get the static site generator approved).

This blog

As a final point, this blog is static HTML. It’s hosted for free on github pages, with a custom domain name. I’m writing markdown right now and using node.js to generate the HTML and CSS. Hopefully you didn’t notice the page loading.