DEV Community

Which is the Best Static Site Generator and Why?

Oyetoke Toby on May 30, 2019

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 a...
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
 
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
 
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
 
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
 
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
 
oyetoket profile image
Oyetoke Toby

There's Cactus

Collapse
 
omidmamadi profile image
Omid

hey, Pelican is Python base :)

Collapse
 
epsi profile image
E.R. Nurwijayadi

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

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
 
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
 
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
 
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
 
oyetoket profile image
Oyetoke Toby

Cool

Collapse
 
bayuangora profile image
Bayu Angora

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

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
 
zeke profile image
Zeke Hernandez

I have sites in Hugo, Jekyll, and Gatsby.
Hugo appears the fastest build, but the templating is goofy to me, but that's a personal thing.
Jekyll has been around the longest I think and has a large ecosystem around it.
Gatsby benefits from the React ecosystem, which is a huge plus for me. And it seems to be growing fast.

My mental framework is if it's a site on the simpler side, I would go with Hugo, otherwise Gatsby, but that's just me.

Collapse
 
adrinux profile image
Adrian Simmons

I wonder how much people's dislike of Hugo's templating is down to not having learnt Golang. It's essentially standard library gotemplate with some extras.

So there's a question - just out of interest - have you learnt golang at all?

Collapse
 
flrnd profile image
Florian Rand

Same thoughts here with hugo's templating. I think a lot of people feel the same way.

Collapse
 
oyetoket profile image
Oyetoke Toby

Same thought

Collapse
 
vuild profile image
Vuild

Not to be contentious but what is a "static site" vs a cms?

Collapse
 
pianomanfrazier profile image
Ryan Frazier

The difference is do you want to compile your site upfront front flat files (ie markdown, templates,...) or hold you data in a database like wordpress?

This has a lot of benefits like

  • better security (no backend or database to be hacked)
  • simple deployment (git push to publish with netlify)
  • cheaper to host (don't need php and/or some caching service)
Collapse
 
vuild profile image
Vuild

Thanks Ryan,

Not to argue (from ignorance), but these seem like pretty low value reasons:

  • Sec is not a CMS thing (I get the db, but that's not really a big concern).
  • Deployment is a dev, not consumer thing. I deploy nonstop.
  • Hosting is cheap.

These are all dev benefits, which I don't really care about in the sense that: Do they improve traffic/UI/SEO/performance etc.

I choose based on the consumer experience/value with less regard for what the devs want (think of it like race cars vs regular).

Trying to figure out if it is better or just another tech trend that is no real improvement. Not really into small, trafficless sites. Seems a lot like the old days (static HTML file can stay for 20 yrs, that part is nice).

Thread Thread
 
pianomanfrazier profile image
Ryan Frazier

No that's fine. No offense taken. Your points are valid.

For me, it really depends on the use case. For my own blog, being able to write markdown and deploy the flat files is a consumer thing when I write my own blog.

I like to program my blog as I blog and this way has given me a lot of flexibility.

If I want to move to a different blog platform I don't have to export from a database.

As far as small tragficcless sites, smashing magazine produces their whole site this way. smashingmagazine.com/2017/03/a-lit...

If I were setting up a blog for a customer, wordpress is still a good choice. For business websites wordpress seems overkill to me, so I use an ssg.

I just listed some of the reasons I have switched. Again for security, I got tired of staying on top of updating and securing my wordpress site. If I didn't touch my WP blog for several months it would get hacked.

I hope this gives you some more context on my comment.

Thread Thread
 
vuild profile image
Vuild • Edited

Ryan,

This answers all my questions as well as possible tbh.

Dev heavy markup, injection, intrusion are good reasons (I was wondering if it was worth losing the breadth of options). I'll try a couple.

Appreciate the explanation, thanks.

Thread Thread
 
ryanhaber profile image
Ryan Haber

From a user/viewer perspective, CMSs are often a lot slower than static. In fact, it's hard for me to see how they wouldn't be. My main concern is my user/viewer/reader, so unless we need functionality only possible in a CMS, I go with a static. FWIW, since you can do a lot of simple JS in a static web page, it's super easy to add Disqus, etc., for commenting and some other basic functionality.

Thread Thread
 
vuild profile image
Vuild

Thanks Ryan, I like the sound of it in a number of scenarios. Pretty agnostic on this stuff overall.

In general a cms is spitting out a static cached page mostly so they can be fast but most devs throw some Gfont embed, ga, a few plugins, db bloat & suddenly the site is garbage.

My site is not fully optimized, but is usually <1s. WP (& php) has a bunch of advanced stuff that i'd have to code already. There are many annoying {solvable} CMS related issues.

I am not using very many 3rd party services anymore unless requested as there is no need for a handful of players to have control of everything. My users are being respected (mostly) & I am enjoying working on my stuff under those circumstances (this is not that relevant to the sitegen but it's where growth is).

What static gen do you use? (I will make some things to see how it suits my needs).

Thread Thread
 
ryanhaber profile image
Ryan Haber

Yeah, absolutely.

Also, I've seen CMSs and I've seen CMSs. They're not all the same.

For static gen, I've only used Jekyll, actually. It's a bit of a new world to me.

For CMSs, my favorites are Joomla!, Drupal, Ghost (oooooh, love it), and a little known one called BrightSpot. There are some lightweight ones that are also pretty good, if simpler.

Thread Thread
 
johnhorner profile image
John Horner

Sec is not a CMS thing (I get the db, but that's not really a big concern).

I don't know what this means, but I recently had to fix up a Wordpress blog which had been hacked because of an insecure plugin. There were ads inserted as posts, and links hijacked to go to really bad sites. The administrator didn't notice for quite a while because the malware was smart enough not to appear if you were logged in as a user.

It's hard to imagine that happening to a static site. With a static site there are just files on a server. What is there to hack? Only the SSH connection to the server itself.

Thread Thread
 
vuild profile image
Vuild

Yeah, my first one was an injected encrypted footer links with useragent & tore down a set of top ranking sites (long time ago). I didn't mean to dismiss CMS sec, it's a pain.

"Sec is not a CMS thing" just meant: Lots of the serious stuff (beyond annoying defacing) is social engineering & lower down the stack. The CMS or db is one part of many.

Collapse
 
johncip profile image
jmc • Edited

CMSs (e.g Joomla, Drupal, Wordpress) typically load the content from some kind of data store, inject it into a template, and serve the dynamically-generated page. You need the web server to do this work -- in other words, it's serving the output of an application rather than static files.

If you do the fetching/injecting on the page itself, in JS, you can have the server just send static files. (But they'll rely on an HTTP API to provide content, so there's technically still a back-end.) See:

It's also possible to have a fully static site that is generated ahead of time from a CMS-like architecture: en.wikipedia.org/wiki/Movable_Type

Such sites are blazing fast and truly need no back end. But they require the developer to generate and deploy a new set of files every time any of the content changes.

Collapse
 
vuild profile image
Vuild

Understood, good explanation thanks.

I mostly run smaller WP on sites from 0-30K uniques a day ish. <1s load on unprimed cache. 50K+ pages no prob. It would be to replace that.

My site is currently well below 1s with the counter removed (with cache on, partial optimization, WIP).

If I make a 50K page static site with constantly updating content (I like every page to change content to some degree as often as possible) & 50+ new pages (posts) a day will there be any issues with constant redeployment (I am assuming that is all handled)?

I don't care much about dev difficulties, mostly about scale/speed of actual publishing as that is 90% of energy (web performance is ok).

Thread Thread
 
oyetoket profile image
Oyetoke Toby

Cool

Thread Thread
 
johncip profile image
jmc

If I make a 50K page static site with constantly updating content (I like every page to change content to some degree as often as possible) & 50+ new pages (posts) a day will there be any issues with constant redeployment (I am assuming that is all handled)?

I'm unfortunately not the right person to answer that well. I did use movable type in the bad old days, but not for anything of the scale you're describing.

But my guess is that static site generation wouldn't be a great fit for this -- not having to rebuild and redeploy frequently is a big advantage of CMSs. And using a page cache will give you most of the benefits of serving static pages.

This article, if you haven't seen it, looks pretty comprehensive: wpcurve.com/wordpress-speed/

...but if you're below 1s then I'd guess you're aware of what they bring up.

And in general, I'd definitely recommend profiling, to whatever extent is possible. I know there are plugins for profiling WP page rendering performance. If you can do something on the db side as well, that'd probably cover everything except the speed of the host itself.

scale/speed of actual publishing

If by that you mean the publishing workflow makes you jump through hoops, maybe it's worth looking into adding something like wordpress.org/plugins/json-api/ and writing a tool that lets you publish from the command line.

Thread Thread
 
vuild profile image
Vuild

For someone who claims to not know much, this is interesting reading & ideas (not just for me). Appreciate it. 👍

I have fast host/front end & the db stuff I can deal with. API UI is interesting.

Workflow goal is to make WP publish more like twitter but higher quality xdevice.

Thread Thread
 
mrrcollins profile image
Ryan Collins

Do you have a website to share with a <1s page load? And any pointers for Wordpress? My sites only get in the 80s with Google's Page Insights tool and I'm also looking for ways to speed it up. :-)

Collapse
 
fahadysf profile image
Fahad Yousuf

This question and the answers to it are extremely useful. Thanks for this brilliant discussion.

Collapse
 
gypsydave5 profile image
David Wickes

I'd suggest... not using one:

to;dr you can get a lot of what you need using simple tools like pandoc

Collapse
 
wspringer profile image
wilfred@eastpole.nl

I used Middleman in the past. It inspired me to create Monkeyman, a Scala static site generator. But Scala isn't really the language of the web, so I moved on to Metalsmith, after finding Wintersmith. Metalsmith is quite nice. It doesn't restrict you in any way. A Metalsmith plugin is really easy to implement, and there's quite an extensive set of plugins already available.

Collapse
 
wspringer profile image
wilfred@eastpole.nl

In case you never heard of Metalsmith or Wintersmith, you might be interested in what I wrote about a it a few years ago: nxt.flotsam.nl/the-rise-of-the-smiths

Collapse
 
sake_92 profile image
Sakib Hadžiavdić

Hi, Scala friend! :D If you have time, please try out github.com/sake92/hepek
It's pure scala, but you can write Markdown in it, has support for lots of goodies! :)

Feedback welcome!

Collapse
 
tiefenb profile image
Markus Tiefenbacher

For a small very static multilang onepager website I'll checked Hexo, Gatsby and Hugo. I choose Hugo for it because of its good documentation and multilang support. Gatsby looked also very interesting but was kind of overkill for this small page.

Collapse
 
oyetoket profile image
Oyetoke Toby

Yeah it is

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
 
sm0ke profile image
Sm0ke • Edited

Ambiguous question. depends on your skills and the profile of your next products.

  • Jekyll - based on ruby, used by Github
  • Hugo, Gatsby, Hexo #impressive newcomers. Gatsby requires basic React / GraphQl knowledge.
  • Gridsome - the Vue.js cousin of Gatsby, not so mature, the SEO score provided out of the box barely hit 80. A few starters are available. Also based on GraphQl.
  • Vuepress - mature product, personally I don't have a good opinion about the support. A few months ago the head of their main branch was broken for one month.
  • Pelican - used by Python community, nice tool but .. missing the new features offered by Gatsby, Hugo, Hexo
  • Cactus - that's a plant. Joking, never use it
  • Roots - never use it.

My personal choice is GatsbyJS for reasons listed below:

  • Use React
  • Use GraphQL, the REST architecture silent killer
  • Impressive implementation of PRPL pattern
  • The number of starters for almost any relevant frameworks: Bulma, Tailwind, Motlin, Firebase .. etc
  • You get > 90 Lighthouse score, out of the box ..

Happy Coding!

Collapse
 
oyetoket profile image
Oyetoke Toby

I love this response

Collapse
 
kahlil profile image
Kahlil Lechelt

Hugo. It's written in Go, so it was compiled down to a native binary. It compiles wicked fast. If you want to blog and you take it seriously you will end up with a LOT of posts of some point and compilation speed will matter a great deal.

AFAIK 11ty has great speed as well because it doesn't have to re-compile the full thing everytime but I am not sure.

Collapse
 
yucer profile image
yucer

Supposedly Jekyll has the advantage that is supported by GitHub Pages.

It means you only need to modify the content and make git push. :-)

And the disadvantage is that is not made in Python. ;-)

Collapse
 
itsasine profile image
ItsASine (Kayla)

Supposedly Jekyll has the advantage that is supported by GitHub Pages.

This actually bit me moving to Netlify the other day. All my builds would fail because I didn't require the github-pages gem. I didn't think I needed it since I wasn't using Github Pages anymore, but apparently, that gem includes jekyll and the fluff needed for github pages, so Netlify's documentation says to require it so they can use it to build.

Collapse
 
commonsenseused profile image
Joey R.

The Python-Based version of Jekyll is Hyde. github.com/hyde/hyde

Collapse
 
yucer profile image
yucer

I guess the templates are 100% compatible, right ?

I wasn't aware. Thank you.

Then I would use Hyde to process the content locally and publish the templates in github pages.

Collapse
 
oyetoket profile image
Oyetoke Toby

Why is that a disadvantage?

Collapse
 
yucer profile image
yucer • Edited

It was a joke. Because I like Python more than Ruby.

Just a matter of taste.

I have never made a real comparison before, feature by feature.

I did just use Pelican and it was very nice. If you need extensions then it is better to choose one from the programming language that you use.

Collapse
 
andrewbrown profile image
Andrew Brown 🇨🇦

I don't know about best but my favourite is Middleman.

I enjoy use Haml, Sass 1.0 and Coffecript as I find it super productive and it's why I use Middleman.

Collapse
 
joshrburks profile image
Josh Burks

I've not done a ton of static sites, but so far I'm liking Middleman. It seems like a "Jekyll Lite" to me. The documentation is pretty good as well.

Collapse
 
oyetoket profile image
Oyetoke Toby

Middleman, been hearing that guy. How's the experience

Thread Thread
 
joshrburks profile image
Josh Burks

I have a ruby and Rails background, so it felt pretty natural to me. It uses a similar pipeline for assets, which is becoming outdated, but it still works and it's dead simple.

I like that the static site movement has forced me to think more "simple" about things. Having a plethora of XaaS providers to lean on (headless CMS, JS based shopping carts, etc) for common things has helped as well.

Thread Thread
 
andrewbrown profile image
Andrew Brown 🇨🇦 • Edited

I used <iddleman, and then I jumped on the bandwagon and built my own pipeline with Webpack. A year or so after that I went back to Middleman and its as you say.

Sprockets may be considered outdated, but it does everything I need and its dead simple to get working.

So I ask myself this, Would you rather write Markdown or Haml?

Collapse
 
benjamincanac profile image
Benjamin Canac

There's Saber in Vue.js made by @egoist github.com/saberland/saber.

I use it for my website and it's blazing fast and easy.

Here is a comparison: saber.land/docs#comparisions

He juste made a theme to kickstart a portfolio based on Github API: github.com/saberland/create-portfolio which is an alternative to github.dev.

Collapse
 
oyetoket profile image
Oyetoke Toby

Checking out saber

Collapse
 
waynee95 profile image
waynee95

I really like zola. It's basically like Hugo. It offers a single binary with 3 commands.

  • zola init
  • zola build
  • zola serve

You configure it using a toml file. One thing why I like it over Hugo, is that it uses a templating engine which is similar to Liquid templates. I find the Hugo templating language a little bit unintuitive, but thats probably related to not having used Go at all yet.

Collapse
 
nickjj profile image
Nick Janetakis • Edited

I run my site (200+ published posts, lots of additional pages, etc.) with Jekyll and I've occasionally looked for alternatives but I haven't found anything that works as well as Jekyll for what I want in a static site generator.

To me the "best" would be:

  • It's really fast in development. In Jekyll's case, even through WSL and 200+ posts with using Jekyll-Assets, I can see my changes locally in 1.5 seconds on save.
  • It lets me use SCSS without much set up. In Jekyll's case, that's standard.
  • It md5 tags all of my assets so I can cache all assets at the web server level. Jekyll-Assets takes care of that without having to do anything special.
  • It lets me create custom tags and filters. I have a bunch and Jekyll makes it super easy to do this since it's just Ruby (I have Ruby experience).
  • It lets me structure my site in a sane way using template layouts and includes, etc.. Jekyll supports all of that, so it's easy to make modular pages.
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
 
cjbrooks12 profile image
Casey Brooks

If you're looking to generate documentation for Java or Kotlin code, with related documentation things like changelogs and wikis, and automated deploys to Github Pages, give Orchid a shot!

GitHub logo JavaEden / Orchid

A beautiful and truly unique documentation engine and static site generator.

Orchid

All Platforms Build Status Linux and Mac Build Status Windows Build status Current Version License: LGPL-3.0 Codacy Grade Codacy Coverage Gitter chat Backers on Open Collective Sponsors on Open Collective

A beautiful and truly unique documentation engine and static site generator.

Example Orchid site

Orchid is a brand-new, general-purpose static site generator for Java and Kotlin, with a focus on extensibility and aimed at developers looking to improve their technical documentation. Orchid was born out of a desire for better-looking Javadocs and frustration with how difficult is it to manage large Jekyll sites and keep it up-to-date with your code.

Orchid supports a variety of plugins, including a wiki, static pages, blogs, and much more. It aims to have high compatibility with many of the existing static site generators, such as Jekyll, Gitbook, and Hugo, so that migration to Orchid is painless. And if you can't find a plugin to do what you need, Orchid provides an intuitive way to add your own private plugins and a rich API so you can make your site as beautiful and unique as an Orchid.

Here's a great tutorial I wrote to get started:

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
 
rmcfadzean profile image
Rob McFadzean

"The right tool for the right job" always holds true but in my experience as a freelance developer building sites for clients of all sizes: GatsbyJS is the winner.

Gatsby has the ecosystem through their own plugin library & react libraries which is great and helps speed up development.
More importantly though, it has an extremely powerful graphql-based data pipeline. This is the #1 killer feature for me. Being able to source pages, posts, products, etc from some remote API/admin panel instead of being forced to keep everything inside of the repo (git is painful if not impossible for non devs, lets be honest) makes Gatsby far more versatile than any other static site gen I've used.
A bonus too is asset management (images, styles, etc). This was always a big pain point for me personally with Jekyll. It's possible but it's not great and I often ended up using a giant custom grunt/gulp pipeline. The webpack setup with Gatsby is far, far nicer and almost flawless out of the box.

It's not without it's problems though. It can be a beast to setup and get going right at times but that's the trade off for the power it provides, in my opinion.

Collapse
 
oyetoket profile image
Oyetoke Toby

Gatsby does put you on speed

Collapse
 
npras profile image
Prasanna Natarajan

May not be the best, but I use nanoc.ws/ for my site for 2 reasons:

  • The view template language is ERB. I'm a ruby dev and I'm most comfortable with erb than any other templates like liquid etc
  • It allows to setup multiple blogs for a single site easily. I have 3 in my blog now: npras.in/tech/, npras.in/general/, npras.in/books/. (They don't have rss yet, but I'll add them soon.)

I've tried Wordpress, Jekyll, Octopress and Hugo in the past and I felt limited with all of them. (Jekyll and Hugo had too many features, Hugo was in Go which I don't know and I wasn't sure if Octopress will last.)

Nanoc isn't perfect either. It's a DIY for your blog. You have to write code for many things that are freely available in the other platforms. But it gives me the flexibility. Allows me to use erb and yield.

And I don't know why the other platforms assume people want just one blog per site. I blog about work in my tech blog, and post book reviews and kindle highlights in the book blog and post everything else in the general blog. I don't want to mix it up and I have tech friends who are never interested in my personal life and vice-versa.

Collapse
 
jessachandler profile image
Jess Chandler

I prefer jekyll, but perhaps that is because that is the one that I'm most familiar with. It is easy to setup a jekyll site. The entry is even more seamless because you can setup your github page with jekyll and slowly step in without ever installing anything on your machine. Customizing can be done in baby steps from whichever theme you first use. There are so many already available themes for different types of sites.

I played with gatsby a little, but it did not drive me to change from jekyll.

Collapse
 
grodier profile image
George Rodier

I’ve only ever used Gatsby, mostly because I’m most familiar with react out of the various frameworjs. However, a static site generator is just another tool in a toolbox to get a job done. Ultimately, in my opinion, it doesn’t matter which one you choose. Only the end product that you build with them really matters. So the best one is the one that your most familiar and comfortable with using.

Collapse
 
oyetoket profile image
Oyetoke Toby

I agree on this

Collapse
 
terabytetiger profile image
Tyler V. (he/him)

I haven't seen this mentioned in the comments yet, but staticgen.com/ is probably a good reference point.

Collapse
 
angeliquejw profile image
Angelique

I definitely don't know anything best, in part because the answer has much to do with what you value and what you are already familiar with.

I've used Middleman and Jekyll on several projects. I've avoided the React- and Vue-based ones because I don't have a lot of experience with those tools (though I plan on learning Vue soon, so I'll probably them explore Gridsome).

When I wanted to include a static site generator in my curriculum, I opted for Eleventy because it had minimum set up and was guaranteed to work for my students who were using a mix of Windows and Mac laptops. So, despite familiarity with other generators, what was "best" for my situation was a new-to-me tool.

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
 
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
 
gbursson profile image
Greg R.

I used to use and love Docpad. It had this flow that worked for me.

Now I am trying to roll out my extremely simple and "internal: use only gulp-based skeleton.

I heard good things about Hugo's speed.

Collapse
 
xanderyzwich profile image
Corey McCarty

11ty was recommended to me as being simple to configure and there was a good tutorial on configuring it for github pages. I use it for my resume and blog (that gets relayed to here) the content is in markdown with Nunjucks templates that are fairly straightforward.

Collapse
 
shlomif profile image
Shlomi Fish

Hi,

I've written about SSGs here: github.com/shlomif/shlomif-tech-di... . As noted there the main take away is that it is not hard to create a home grown SSG based on some tools like a templating system/preprocessor and a build system and I cannot recommend against it.

Anyway, so far I used:

  1. github.com/thewml/website-meta-lan... which is powerful and flexible, but slow. I wrote my own custom logic above it in web-cpan.shlomifish.org/latemp/ and other repos.

  2. I tried Jekyll ( github.com/jekyll/jekyll ) but found it too opaque and hard to tweak ("trivial things are quite easy, but anything harder is close to impossible.").

  3. I used template-toolkit.org/ for a few sites and it was fast and flexible, but it is based on perl 5.

  4. I used github.com/Ceasar/staticjinja and ran into some quirky behaviour.

  5. I converted the fc-solve.shlomifish.org/ site from wml to jinja2 , which avoided the staticjinja quirks but then I grew to dislike jinja2's scoping, and would rather avoid it for future work.


So what is my recommendation? I'd probably use the Template Toolkit if Perl was more popular. Otherwise, I have not found the holy grail yet.

Collapse
 
thiagomgd profile image
Thiago Margarida

As mentioned in other comments, better is too broad, but for me:

  • Hugo: it's an executable. No need to install ruby/python/etc if you don't code on those languages. Also, it's FAST.
  • Gatsby: if you like React, it's awesome.
Collapse
 
jcs224 profile image
Joe Sweeney

Not on the list, but a wonderful gem, Jigsaw. I build all new simple sites with it. I tried Hugo but found Jigsaw far easier. Highly recommended for PHP/Laravel devs looking to utilize their knowledge with a static site generator, but I think it's pretty easy to use regardless. I found it much easier than Hugo, which is the only other one I've tried.

Collapse
 
amberwilkie profile image
Amber Wilkie

I use and love Gatsby. I've written a couple of articles about it:

Offsite link to more general post about why Gatsby is so great

Gatsby is so easy to work with if you are already a React developer. Everything is exactly where you expect it to be, and you can use whatever npm packages you like. It's got great SEO settings out of the box. And the documentation is no joke - everything just works.

I also cannot get over how awesome the combination of Gatsby + Netlify + Github is. You push new code to master and Netlify will pick it up and automatically deploy your site. That is freakin' awesome. It also supports previews for feature branches. I can't tell you how nice it is not to bother with DevOps on personal projects.

Collapse
 
sliftvolte profile image
SliftVolte

Don't forget Eleventy 11ty.io/

Collapse
 
sergiodxa profile image
Sergio Daniel Xalambrí

I used Next.js to generate a static website, then tried to migrate to Gatsby and it was slower than Next to build. Then I build my own SSG called Contentz which is focused on writing and not in configuring and also can build my website in second, previously in minutes with Next and Gatsby.

Collapse
 
buzzedison profile image
Edison Ade

I use Gatsby for all my static sites. It's SEO features, Easy Integration with Contentful and other Headless CMS, Speed and Ease of Use.

I felt like because i already know React, it was an easy next step.
Experimenting with Hugo as well.

Collapse
 
kildareflare profile image
Rich Field

React Static
I've created sites in both React-Static and Gatbsy - in each case the data came from a headless CMS.
I switched to React-Static as the CMS integration was easier.
That said this was a couple of years ago and both appear to have developed / matured since then.

This blog post from the creator of React-Static highlights the key differences between the two - the differences back in 2017.

Collapse
 
oyetoket profile image
Oyetoke Toby

Wyam.io, thats a .Net thing. I will probably check it out. C# is my thing

Collapse
 
suciptoid profile image
Sucipto

I'm using Hexo (nodejs) for my blog and interested with Gridsome (Gatsby like, in Vue)

Collapse
 
oyetoket profile image
Oyetoke Toby

How's your experience with Hexo

Collapse
 
sliftvolte profile image
SliftVolte

it depends on the size of your project. But if you have several hundred pages Hugo is a must. And who knows, maybe one day we'll see React or Vue pipelines for some reactive components in Hugo.

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

Collapse
 
get_hariharan profile image
Hari Haran😎

Is there one for angular or dotnet ?

Collapse
 
nnabb profile image
Nick Nabb

This is handy for comparing/filtering on language and templating in case you are used to something specific:

staticgen.com

Collapse
 
dyygtfx profile image
Go7hic
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
 
archeelux profile image
Arturs Timofejevs

Eleventy is a pleasure to work with.

Collapse
 
zeptobook profile image
ZeptoBook

Here is a good article about how to create your blog site using Gatsby.
zeptobook.com/create-your-blog-sit...

Collapse
 
brojenuel profile image
Jenuel Oras Ganawed

Is Netlify one of the list?

Collapse
 
iamcastelli profile image
Sowed Castelli

It's 2020, and by far, I think Next.js should be at the top of this list. Ease of you and the Developer Experience. Gatsby is my second choice.

Collapse
 
rognoni profile image
Rognoni

The idea is really at the beginning, but let me add this alternative non-generator to your list
dev.to/rognoni/monastic-browser-57l5