Choosing a static site generator

What are static site generators?

Static site generators are programs used to produce a website that does not need a database. They produce sites that can be easily distributed on GIT, Amazon S3 or nearly any hosting service.

Static HTML + templates: having a template engine behind the the static HTML reduces development time tremulously for a static site.  A data file is used to build the menu and templating languages can include partials and logic that compiles into the static HTML. The beauty of static sites is their simplicity and speed.

What are they used for?

Design Systems: many design system documents are deployed to the web by static site generators. Since they easily live in the eco-system of front end development, it is quick to compile them and deploy them to the web.

Documentation: creating documentation is existential to efficient development. Static site generators can export to Markdown and can be easily deployed to GIT for hosting or anything other server. It is quick to deploy and easily to update.

Blogs: the two options reviewed both come with all the tools necessary to manage a blog. Writing and posting is simple and the default homepage displays the newest posts by default.

Small to medium size websites: static generators excel at creating small websites. By small, think 10-20 pages with any number of posts. Once a site grows beyond 100 pages, it would be good to consider the benefits that come from a database in my opinion.

Two Popular Options

Jekyll

Jekyll was built for GIT. It has the widest adoption of generators and has powered sites such as Healthcare.gov. It is written in Ruby and uses Liquid for it’s template engine.

Hugo

Hugo is newer than Jekyll and is increasing in popularity. It is written in GO and it very fast at compiling HTML pages.

The Details

Language: Ruby

Templating engine: Liquid (build originally for Shopify)

Platform: Native to OS and Unix, able to run on Windows

Adoption: Most popular static generator

Overview: Jekyll is a little more simple to getting started with than Hugo. It’s use as Git’s generator makes it a solid choice and insures it will be updated into the future. Ruby is used primarily on Mac and Unix, so it may be more complicated to get running on Windows. There are many extensions for Jekyll due to its popularity. It’s templating engine has all the features needed to create static sites and documentation.

 

Language: GO (written by Google)

Templating engines: Go Html/template, Ace, Amber

Platform: platform agnostic

Adoption: not as ubiquitous as Jekyll but gaining popularity

Overview: Hugo runs very fast, some benchmarks have it at least 4x faster than Jekyll for rendering and increases to 9x when sites reach 1000+ pages. This becomes pronounced with many pages (100+) rendering. Go is platform agnostic, so it is easy to run on both Mac and Windows and is a binary, meaning is will always be faster than Ruby.  The templating engine is fully featured for our use. GO is a language gaining speed. Learning it may have future benefits.

Conclusion

Both Jekyll and Hugo are great options. It’s hard to choose, but ultimately, I think Jekyll is the best option for my needs. Jekyll has the widest adoption and will be easier to teach to other designers and developers.  Ruby and Jekyll can run on Windows with success, which solidified its place for me.

MENU