DEV Community

Oyetoke Toby
Oyetoke Toby

Posted on • Edited on

Which is the Best Static Site Generator and Why?

It's 2019 and we have tons of static site generator all over the internet built with various languages.

I am trying to curate a list of the best and also the best one to use for my new open source project.

Below is a list of popular static site generator (the ones I know):

  • Jekyll
  • Hugo
  • Gatsby
  • Gridsome
  • Octopress
  • Vuepress
  • Hexo
  • Harp
  • Pelican
  • Cactus
  • Roots
  • Hyde
  • Middleman

Pick one and explain why it is better. If the one you chose is not listed above, just say it and explain why you are choosing it over others.

Tweet and share this discussion to reach more people

PS: I will be taking notes from your comments and use it to write a comprehensive list of best static site generator, why and why not to use it.

Oldest comments (116)

Collapse
 
flrnd profile image
Florian Rand • Edited

Better is very broad. Better in what? Better documentation? Better in build speed?

I can't say which one is better. I've tried Jekyll, Hugo, Hexo and Gatsby and I finally opted with gatsby because is very easy to start with, has a very good documentation, lot of plugins and what not. But the other three where perfectly fine options. Do you like ruby? Jekyll. Do you preffer golang? Hugo. Do you like react? Gatsby...

Collapse
 
bhupesh profile image
Bhupesh Varshney 👾

Is there one for Python 😅😅 ?
I am currently using jekyll-now but do not know ruby 😅😅

Collapse
 
flrnd profile image
Florian Rand

This is the only one I know github.com/getpelican/pelican but I'm sure if you search in google static site generator python there must be a few.

Thread Thread
 
bhupesh profile image
Bhupesh Varshney 👾

Yeah i have done that
Doesn't seem soo good
😭

Collapse
 
landreville profile image
Landreville • Edited

There's Nikola which isn't very well known, but I've found it easy to theme and customize heavily.

And Lektor which seems promising and allows defining custom models for posts (to have different metadata, templates, etc depending on the type of post).

Collapse
 
oyetoket profile image
Oyetoke Toby

There's Cactus

Collapse
 
prahladyeri profile image
Prahlad Yeri • Edited

I was in the same boat, switched to Pelican recently and never been happier! Its the python equivalent of ruby's jekyll.

Thread Thread
 
buzzedison profile image
Edison Ade

What makes it standout? checked out the website and can't find anything interesting

Thread Thread
 
miron profile image
Miron

If you want interesting, don't look for a static site generator :)

Collapse
 
pianomanfrazier profile image
Ryan Frazier • Edited

Not exactly python, but 11ty uses nunjucks, a port of jinja2 to javascript, so should feel very familiar. I have been able to do some cool things with it.

Collapse
 
johnbokma profile image
John Bokma

I have written one in Python: github.com/john-bokma/tumblelog

You can see the site I generate with it at plurrrr.com/

Collapse
 
epsi profile image
E.R. Nurwijayadi

Does anynone know how to setup pelican for use with bitbucket.io ?

Collapse
 
omidmamadi profile image
Omid

hey, Pelican is Python base :)

Collapse
 
oyetoket profile image
Oyetoke Toby

I prefer Gatsby(React), Hugo(Go), Cactus(Python/Django). My basic language is Python, Javascript, Go

Collapse
 
oyetoket profile image
Oyetoke Toby

Which do you prefer and best for your needs and the reasons

Collapse
 
flrnd profile image
Florian Rand • Edited

I like Gatsby and Hugo. I Ditched Hugo because I disliked its templating syntax, but that is a silly reason, just didn't like it.

{{ $title := .Site.Title }}
<ul>
{{ range .Params.tags }}
    <li>
        <a href="/tags/{{ . | urlize }}">{{ . }}</a>
        - {{ $title }}
    </li>
{{ end }}
</ul>

I tried Gatsby and felt in love with it. Things like styled components and another few from the react ecosystem make Gatsby very attractive and fun to use. Another plus is that I can use my react experiments in my personal site and vice versa.

Thread Thread
 
svitekpavel profile image
Pavel Svitek

+1. It reminds me of PHP -> too many special characters for no good reason.

Thread Thread
 
bayuangora profile image
Bayu Angora

Why you complicate your code with that code?

{{ $title := .Site.Title }}
<ul>
{{ range .Params.tags }}
    <li>
        <a href="/tags/{{ . | urlize }}">{{ . }}</a>
        - {{ $title }}
    </li>
{{ end }}
</ul>

What if make your code simpler like this?

<ul>
{{ range .Params.tags }}
    <li>
        <a href="/tags/{{ . | urlize }}">{{ . }}</a>
        - {{ .Site.Title }}
    </li>
{{ end }}
</ul>
Thread Thread
 
flrnd profile image
Florian Rand • Edited

I copy pasted it from hugo itself, ask the developer :).

Besides, that variable that you removed it's probably used in more parts of the code I copy-pasted.

Collapse
 
ben profile image
Ben Halpern

I am very impressed with Gatsby, but I think some of these solidly address different concerns. I wouldn’t want to go with Gatsby on a site that doesn’t need React—which is a lot of types of sites.

Collapse
 
vip3rousmango profile image
Al Romano

Fan of Harp.js, as my go-to for spinning up quick static sites. I've tried Jekyll and Hugo and are easily comparible. Haven't tried any of the others yet but they're on the list.

Whatever plays nicely with my build tooling (Brunch/NPM) is what get's the win from me.

Collapse
 
oyetoket profile image
Oyetoke Toby

I am not really a fan of Brunch. I don't really like Ruby so Jekyll go down with it. Hugo is the fastest with the comparison with Gatsby

Collapse
 
ricalamino profile image
Ricardo Alamino

Hugo is fast. I like that!

Collapse
 
oyetoket profile image
Oyetoke Toby

Yea very fast and stable

Collapse
 
ricalamino profile image
Ricardo Alamino

Never had any serious problem using it.

Thread Thread
 
oyetoket profile image
Oyetoke Toby • Edited

Sure. I also love Gatsby I am just worried about the underlying React and if it's license don't have effects with users using Gatsby

Collapse
 
brob profile image
Bryan Robinson

I don't know about "Better," but the one I'm enjoying most right now is Eleventy (11ty).

I like it because it's fast, is similar to others I've used in the past and it's based in JS. When I started using it, it was because it was "Jekyll-like" but built with JS, so no need to install ruby or manage ruby.

I like how simple and flexible it is. It's super easy to use a lot of different templating engines and it doesn't take over a project as hard as some of the others.

I really like the idea of "JavaScript Data Files" that it has. You can have JSON data files like in Jekyll or you can have a JS file that exports a module that collects and formats data on build. Super handy.

I wrote a LITTLE about it here: bryanlrobinson.com/blog/2019/04/02...

Collapse
 
oyetoket profile image
Oyetoke Toby

Cool

Collapse
 
bayuangora profile image
Bayu Angora

What's about 11ty building speed benchmark compared to Hugo?

Collapse
 
pianomanfrazier profile image
Ryan Frazier

I second 11ty. The templating is super flexible. You can do some cool things with it. I wrote about it at LilyPond in markdown.

Here is the demo.

Collapse
 
epsi profile image
E.R. Nurwijayadi

How do I read data from YAML files in 11ty ?

Collapse
 
jameesy profile image
Jamees Bedford

I have tried most of them and from the list will always choose Gatsby.

I think it comes down to a mix of personal preference and technology. I feel confident with the React ecosystem so Gatsby is the obvious choice.

Collapse
 
remotesynth profile image
Brian Rinaldi

I've used a ton of them (some not listed here) - particularly a couple years ago when writing the report and book on this topic for O'Reilly. I always recommended Jekyll or Hugo as my preferred tools. That being said, some more recent tools like Gatsby and Eleventy I have not had a chance to use. For my own projects, I still generally rely on Jekyll or Hugo as they continue to improve, work well, have good documentation and have a large community.

I would like to try Gatsby as I hear many great things about it and I am more comfortable in JavaScript than in Ruby or Go. Which gets at an important point, the underlying language can be an important factor, especially on more complex sites that may require some complex customization.

Collapse
 
lauragift21 profile image
Gift Egwuenu

Based on my own thoughts I don't think it's a good thing to say one is better than another. I have worked with Gatsby, Hugo and Gridsome and they all have great things to offer.

To me it depends on the language you're comfortable with if it's React then fine go with Gatsby, if it's Vue then you can go with Nuxt or Gridsome that's how I will compare my interests.

Collapse
 
oyetoket profile image
Oyetoke Toby

Yeah, you hit the right button. It's all depends on the language you are comfortable with, but not only that. You also wanna make sure it meets your demand. I actually forgot to put Gridsome.

Collapse
 
oyetoket profile image
Oyetoke Toby

I have not tried Gridsome yet, and even though I am more of vue. Any thoughts on Gridsome?

Collapse
 
robotshateme profile image
scott ream

Gridsome was easy to understand for me to play around with having no understanding of Vue. Granted I was just modifing one of their starters but the docs and clarity of code made it a pleasure.

Collapse
 
mgh87 profile image
Martin Huter

No one is missing vuepress on the list? 😔

Collapse
 
oyetoket profile image
Oyetoke Toby

Just added Vuepress. I don't really know much about it

Some comments may only be visible to logged-in visitors. Sign in to view all comments.