As the headless CMS hype continues, brands are mulling over front-end solutions — experimenting with different heads for their headless CMS, if you will.
Static site generators (SSGs) aren’t new by any means, but interest in them grows as the interest in headless and decoupled solutions grows.
What Is a Static Site Generator?
Static site generators operate as a halfway house between operating a hand-coded HTML site and a fully fledged CMS. With an SSG, you generate an HTML-only website using (mostly) markdown files, templates and sometimes a few plugins. That site can then be uploaded to a server, remaining unchanged until the next time the SSG is run.
Their simplicity and agility makes them a good solution for enterprises looking to deploy microsites and landing pages.
Static sites offer three main benefits:
Speed: SSGs don’t typically require databases, nor do they rely on server-side script processing
Flexibility: You’re generally free from traditional content management system constraints — particularly if your SSG allows you to code your own plugins.
Security: Thanks to the simplistic nature of a static site, hackers and malware bots have less loose ends to exploit.
And of course, SSGs pair well with headless and decoupled solutions, as front-end presentation is all a static site generator lives for.
But just like with flat-file CMS, you have many options to choose from (457 at the time of writing).
Top Static Site Generators
If you're looking to use an SSG as the delivery side for your headless or decoupled CMS, here's a list of the top 15 SSGs — in no particular order.
1. Hexo
Boasting an array of plugins and themes, Hexo describes itself as a blog framework. It supports Markdown and YAML and allows you to deploy to sites to GitHub Pages and Heroku with one command.
Its themes and plugins offerings are pretty strong, too.
2. Jekyll
It would be impossible to discuss static site generators without mentioning Jekyll.
Jekyll provides easy migration options from platforms like WordPress, and supports Markdown, Textile and Liquid. Jekyll is also blogger friendly, with permalinks, categories, pages, posts and custom layouts coming as part of the package.
3. Hugo
Written in Go, Hugo supports YAML, JSON and TOML data file types and uses shortcodes instead of plugins to add rich content. Hugo sites can be hosted anywhere, including Heroku, GoDaddy, DreamHost and GitHub Pages.
Hugo also has its own community outside of Github.
4. Octopress
The Octopress website hasn’t been updated in a while, but the project is still going strong on Github. Identifying as a “blogging framework for hackers,” Octopress started out as a modified version of Jekyll, so Jekyll users will feel right at home using it.
Octopress allows users to easily embed code into their posts from gists, jsFiddle or their own file systems, all with Solarized styling. It can integrate with Twitter, Pinboard, Google Analytics, and Disqus.
5. Metalsmith
Metalsmith is essentially a collection of user-defined plugins that empower it to build just about anything, from simple blogs to complex apps. On top of a ton of plugins, there is Markdown support, and when it comes to templating languages, you can make use of Handlebars or Jade.
It’s not the easiest tool to adopt, but it is one of the most powerful.
6. Pelican
Powered by Python, Pelican supports reStructeredText, Markdown and Asciidoc. Plus, it has plugins, themes, multilingual capabilities as well as Atom and RSS feed support. All of its Jinja2 templates can be easily customized, too.
7. Sculpin
Written in PHP, Sculpin stands out from the crowd — but not by much. It converts Markdown files, Twig templates and standard HTML into a static HTML site that can be easily deployed.
Furthermore, Sculpin is built on Symfony's HTTP Kernel. Thus, you can use Symfony Bundles to extend Sculpin for any advanced functionality you need without extending Sculpin directly. Like Hudo, Sculpin also has its own on-site community.
8. Assemble
According to Assemble, its SSG makes it easy to, “leverage the full force of powerful frameworks like Bootstrap and Zurb Foundation.”
It’s a pluggable static site generator for Grunt.js, Yeoman and Node.js. There aren’t too many plugins available at the time of writing, but Assemble has plans to expand its range.
Learning Opportunities
9. Roots
Roots is a product of digital marketing agency Carrot Creative.
The SSG comes with support for CoffeeScript, Jade, Stylus and Sprout, although you can of course use good old CSS if that’s what you’re comfortable with. Roots also has a small set of extensions.
10. Middleman
Like Roots, Middleman was born out of a digital agency’s need for an SSG. This time though, it was Instrument who did the building. Middleman is a Ruby-based open source static website generator relied upon by the likes of Mailchimp and Vox Media.
Middleman uses Ruby’s standard embedded Ruby (ERB) templates engine, although this can easily be swapped for Haml or Liquid.
11. Wintersmith
Wintersmith is a node.js-based SSG with a huge plugin offering.
Plus, Wintersmith allows users to bundle JavaScript with Browserify, write reusable styles with LESS, Sass or Stylus, and leverage reusable web components. Its Github page is home to a good range of community made plugins.
12. Nikola
Nikola is an open source SSG written in Python. It serves up a healthy amount of themes, plugins and shortcodes. For speed purposes, Nikola uses doit, which provides incremental rebuilds — meaning that it only rebuilds the pages that need rebuilding, saving CPU time and upload bandwidth.
13. Hyde
Hyde is another SSG written in Python. Hyde’s mission is to remove the pain points involved in creating and maintaining static websites. One way it achieves this is by providing Instant previews using a built-in webserver that regenerates content if needed.
Hyde is also built with a stripped down engine where even features like metadata are added as plugins to keep the engine lean.
14. DocPad
DocPad takes your content from several sources, like files on your computer, and renders them into fast static pages. As well as supporting an array of markup languages, DocPad serves up a wide range of skeletons and plugins allowing you to add functionality like WYSIWYG editing.
15. Nanoc
Nanoc is suitable for building both personal blogs and enterprise sites. Nanoc supports Markdown, AsciiDoc and Textile, as well as a range of templating languages, from eRuby to Mustache. Nanoc also supports multilingual sites.
Honorable Mentions:
As mentioned above, you do not lack for choice in the SSG world. So if none of the options above sound right for you, try one of the following:
Learn how you can join our contributor community.