What Are Static Site Generators?

The simple technology behind some of your favorite websites

iMac with a static site generator website on its screen

 Place.to

What are Static Sites?

In the early days of the Web, pages were simple HTML and CSS. They weren’t dynamic programs, and there weren’t extensive databases behind them. As a result, it was cumbersome and time consuming to update an entire site or apply new styles. To solve the problem, developers started using programming languages like PHP to make websites. Websites transformed from simple HTML affairs to full-blown applications in their own right.

Static HTML

With a dynamic, program-based website, content can be generated using the code, and there’s no need to code every single page individually. All the important information is stored in a database and the program plugs it in to each page where appropriate. In most situations, it’s more efficient and easier to manage.

For simple sites, though, a dynamic website is unnecessarily complicated. If you only need a simple page or two that displays some information about your business, why do you need a whole web platform like WordPress? The answer is, you don’t. Then, there’s the speed factor. Simple static sites are much quicker. There’s nothing going on in the background, it’s just simple HTML. So, static sites are insanely fast in comparison.

Why A Static Site Generator?

What happens when you want the benefits of both a static site and a web application? That’s where a static site generator comes in. Instead of having a web application constantly running on your web server, you can use a static site generator to dynamically create your site and all the static pages in it. Then, simply upload the files to your server, and everything’s set. Your site iss still dynamically generated, but it’s dynamically generated once before you put it online, instead of each time someone makes a request for a page.

Jekyll static site generator creating a simple site

Static sites generated with a static site generator are much faster than dynamic sites. They require fewer server resources to run, and they can handle more traffic.

Static sites are also more secure than dynamic sites, and they require less maintenance. Like any other computer program, a web application like a dynamic website can have bugs or security flaws. These flaws are behind a decent amount of the famous data breaches in the news. WordPress is the most popular dynamic website platform, and it’s also a favorite among hackers for a reason. Static websites don’t have a program to exploit or a database to break into.

Static sites are also just simpler to use. There’s less configuration that you need to do on the server side to run a static site. Static sites are also simpler to make in some instances. For a five-page website that displays some business information, even a WordPress site can be excessive.

Popular Options

Over time, static site generators have only grown in popularity. There are dozens of common options, but a few stand out as favorites.

Jekyll is easily the most popular options, and it’s been around longer than most. It’s written in the Ruby programming language, the same one that gave rise to the popular Rails framework, and it features its own convenient templating language to simplify the creation of your pages. If you’re looking for somewhere to start with static site generators, Jekyll is a great place.

If you’d like some other options, take a look at Hugo, Nuxt, Gatsby, or Wintersmith. They’re all popular options and offer features similar to Jekyll with their own spin. They’re all free and open source, so feel free to experiment and find something that fits your style.