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.
Top comments (116)
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...
Is there one for Python 😅😅 ?
I am currently using jekyll-now but do not know ruby 😅😅
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).
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.Yeah i have done that
Doesn't seem soo good
😭
I was in the same boat, switched to Pelican recently and never been happier! Its the python equivalent of ruby's jekyll.
What makes it standout? checked out the website and can't find anything interesting
If you want interesting, don't look for a static site generator :)
I have written one in Python: github.com/john-bokma/tumblelog
You can see the site I generate with it at plurrrr.com/
hey, Pelican is Python base :)
There's Cactus
Does anynone know how to setup pelican for use with bitbucket.io ?
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.
I prefer Gatsby(React), Hugo(Go), Cactus(Python/Django). My basic language is Python, Javascript, Go
Which do you prefer and best for your needs and the reasons
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.
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.
+1. It reminds me of PHP -> too many special characters for no good reason.
Why you complicate your code with that code?
What if make your code simpler like this?
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.
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...
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.
Cool
What's about 11ty building speed benchmark compared to Hugo?
How do I read data from YAML files in 11ty ?
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.
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.
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?
Same thoughts here with hugo's templating. I think a lot of people feel the same way.
Same thought
Not to be contentious but what is a "static site" vs a cms?
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
git push
to publish with netlify)Thanks Ryan,
Not to argue (from ignorance), but these seem like pretty low value reasons:
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).
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.
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.
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.
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).
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.
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.
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.
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.
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).
Cool
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.
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.
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.
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. :-)
This question and the answers to it are extremely useful. Thanks for this brilliant discussion.
I'd suggest... not using one:
The World's Simplest "Static Site Generator"
David Wickes ・ Oct 19 '18 ・ 3 min read
to;dr you can get a lot of what you need using simple tools like
pandoc
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.
Yeah it is
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. ;-)
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.
The Python-Based version of Jekyll is Hyde. github.com/hyde/hyde
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.
Why is that a disadvantage?
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.
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.
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.
Middleman, been hearing that guy. How's the experience
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.
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?
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.
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.
Ambiguous question. depends on your skills and the profile of your next products.
My personal choice is GatsbyJS for reasons listed below:
Happy Coding!
I love this response
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.
Checking out saber
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.
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
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!
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.
I really like zola. It's basically like Hugo. It offers a single binary with 3 commands.
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.
Some comments may only be visible to logged-in visitors. Sign in to view all comments.