
Top Open-Source Static Site Generators - ColinWright
https://www.staticgen.com/
======
shubhamjain
If anyone is considering using Hugo, please account the tens of hours you will
spend debugging its weirdness and magic. Yes, it's fast but it seems that
ease-of-use was its lowest of the low priority. How variables work is
impossible to understand. So is creating new layouts. Every change, however
minor, involves fighting hard until I give up and settle for a hack.

The speed of generation doesn't seem much of an added advantage since you're
gonna do it only once anyway. It's hard to know why would anyone make such
weird design choices to solve a problem that has an easy, known solution. Am I
trivializing? Maybe, but I know how much time I spend on rendering when I am
working with Flask + Jinja and how it's 10x worse with Hugo.

Sadly, moving my blog way from Hugo would be too much work and I have to bear
with it.

~~~
Kagerjay
Stick with Jekyll, its robust, has support with github pages, most number of
themes for a static site generator, and the benefits you get from Hugo for
performance are very small

~~~
jlpom
What prevent Hugo from being supported by GitHub pages? I have never
understood the "Jekyll integration" thing, you're just pushing static assets
created by your static site generator to GitHub, so why would it be different
from a generator to an other?

~~~
Kagerjay
Github is based on ruby, so is jekyll, so its a frictionless setup that's
free.

You can use netlify but there's more setup to that than github imo.

with github you can also have as many sites as you want, little unknown fact
just make 100 organizations and you have 100 sites. Content is open to anyone
though. But the option is still nice to have

------
rubenbe
I recommend Lektor [0], because it ships with a administration UI. This means
you can give/sell it to people that would otherwise want a wordpress site.
Unfortunately that feature doesn't pop out on the staticgen list.

[0][https://www.getlektor.com/](https://www.getlektor.com/)

~~~
jamietanna
[https://www.netlifycms.org/](https://www.netlifycms.org/) is an alternative
for Hugo/Jekyll

~~~
throwaway77384
Been making some inroads with this one and hoping to be able to use it with
client-facing work soon.

The super simple deployment and administrative process, along with Hugo's
crazy speed and flexibility make this stack shine.

If you know a bit of Golang, then there's almost nothing you can't do with
this.

------
snicker7
The reason why there are so many static site generators is that they are
trivial to write (which is why making your own is a good beginner coding
project):

    
    
        for {post}.md in in blogdir:
            if timestamp({post}.html) < timestamp({post}.md):
                convert_md_2_html({post}.md)

~~~
toxik
This looks a lot like a Make rule to me.

    
    
        %.html: %.md
              generatehtml $^ >$@

~~~
flukus
Here's a slightly more involved but still incredibly simple one I put
together: [https://flukus.github.io/building-a-blog-
engine.html](https://flukus.github.io/building-a-blog-engine.html)

Turned out a hell of a lot faster than any static site generator I've used.

~~~
toxik
Those who are unaware of history is doomed to repeat it, eh.

I use makefiles for a lot of things, they're very straight-forward. If you
just follow the UNIX design philosophy, your programs are going to be
makefile-useable anyways.

------
alan_n
I've tried so many static generators, but they just all fail miserably past a
certain point. For a simple blog, just text, etc, they're great. But once you
get into adding images, rss, or any sort of complex layout and routing, none
of them are really designed to handle that much complexity. Metalsmith came
the closest because of it's plugin system, but only because I ended up writing
my own plugins and just basically writing a static generator on top of it. But
it can't do live previewing at all which is really annoying.

Recently I tried Nuxt because I really like Vue, but although these new types
of generators are great for handling layout, and the live reloading rocks,
they're not really designed for a truly static site, the pre-rendering
includes a lot of unnecessary bloat. There's basically a copy of every post
both in the html and the javascript, it's also super hard to control it so
it's only the posts for that one page. You can remove the scripts manually but
then you lose all js functionality. I gave up trying to find a sane
workaround. They're not really meant for content that's truly static that you
don't need to update.

I've given up on this point and have just started to write my own, focusing on
fast live reloading and easy config (like Vue's cli) because that's one of the
other huge problems with all generators.

~~~
atmoz
What do you mean by adding images? Do you want to login via the browser and
manage a media library?

Are creating RSS templates [1] considered as "handling the complexity", or is
that too much hassle?

[1]: [https://github.com/atmoz/atmoz-
net/blob/master/.ply/feed.tem...](https://github.com/atmoz/atmoz-
net/blob/master/.ply/feed.template)

~~~
cmroanirgo
> What do you mean by adding images?

For me, lack of nice (ie. controllable, but 'automagic') image handling is a
huge bug bear in nearly every cms out there, static or otherwise. Perhaps I
didn't find the right platform/plugin...

In my case, I wanted to have 1 source image that was resized at various
(author controllable) sizes and then saved them, while also generating
supporting HTML (eg. 'srcset' to automatically swap between them). I ended up
with a couple of ways to template it in [0]:

For a thumbnail:

<img src="{{image #thumb{w:50} }}">

For srcset:

<img src="{{image}}" srcset="{{image #srcset{w:'256,512,800',orig:'1152'} }}"
sizes=...>

[0] [https://github.com/ergo-cms/plugin-thumbnail](https://github.com/ergo-
cms/plugin-thumbnail). (Note the entire project itself stalled some time ago,
and wouldn't recommend it here -- even though I do dogfood it)

EDIT: reorder wording

~~~
thirdsun
I think this is a task that is handled by an optional CMS, not the static site
generator itself, though I agree it would be handy to have a little helper
snippet to do that during build.

There are CMS solutions for static sites which will probably handle images,
and all kinds of content, easily. Check out Dato[1], Siteleaf[2] or Netlify
CMS[3].

Alternatively you can use external tools to prepare your images and simply
rely on the standard HTML srcset within your static site generator of choice.
I use RetroBatch[4] to prepare my images.

[1] [https://www.datocms.com/](https://www.datocms.com/)

[2] [https://www.siteleaf.com](https://www.siteleaf.com)

[3] [https://www.netlifycms.org/](https://www.netlifycms.org/)

[4] [https://flyingmeat.com/retrobatch/](https://flyingmeat.com/retrobatch/)

------
norswap
You want to write a simple static website. Now you have to choose between 100
generators. Your life has become a little bit worse.

Personally I rolled my own, but I can't say I would necessarily recommend it.
But in less than 300 lines of JS it can generate by site from Markdown, with
index pages and RSS, as well as watch in the background for changed files and
update them live. It was a fun and useful learning experience though.

~~~
pmlnr
> Now you have to choose

No, you don't _have_ to. It's perfectly fine to write a markdown file and
render it into html with Pandoc.

~~~
pjc50
That's still a choice.

~~~
nulagrithom
If you've got decision fatigue before you even start your project then maybe
it's time for a vacation.

On the other hand, now you have to choose between 100 destinations, and your
life has become a little bit worse.

------
bryanwb
I have really, really enjoyed building my personal site
([https://hotair.tech](https://hotair.tech)) in Gatsbyjs. I am not sure of how
steep the learning curve is as I started using it w/ the intent to learn React
and GraphQL. It strikes a good balance of being both a productive framework
and letting you use the full features of GraphQL and React.

I much prefer it over my previous experience w/ Jekyll.

------
discreditable
I love Pelican. It was relatively easy for me to migrate from Octopress (which
seems pretty much dead at this point). With pelican it was pretty easy for me
to write by own extremely lightweight theme:
[https://brashear.me/blog/2017/07/30/migration-from-
octopress...](https://brashear.me/blog/2017/07/30/migration-from-octopress-to-
pelican/)

~~~
stadeschuldt
Coming from Python I like Pelican a lot. It also looks like there is an active
development going on:
[https://github.com/getpelican/pelican](https://github.com/getpelican/pelican)

I am still wondering, why the last release was made over 18 month ago.

~~~
discreditable
My Python is only marginally better than my Ruby (not great). Even so,
developing my own theme was easy following their docs.

Looking at their blog[1] they seem to do releases very infrequently. 3.5 was
released 2014-11-20. 3.6 was released 2015-06-15. 3.7 was released 2016-12-12.
It seems like each release is about a year and a half apart. By that cycle
we're about due for one.

1\.
[https://blog.getpelican.com/category/news.html](https://blog.getpelican.com/category/news.html)

------
ujuj
The only thing I don't like about SSGs is the need to be on a computer that
have the right software installed: I use different computers and sometimes I
just want to add some link into my website. This leads to too much work for
just a link.

I've been interested in [1], that is written in Rust and is available in a
single binary. This eases the installation process.

Something interesting to consider are client-side site generators. I don't
think there's a lot of them, but if you want to write your articles on
markdown files on github/vim and update your website with a git push, it's a
nice thing to consider. I wrote my own tiny one because it's fun (and it works
just right for me), but see [2] and [3] if you're interested in these type of
solutions. They work well with Github Pages.

[1]: [https://www.getgutenberg.io/](https://www.getgutenberg.io/)

[2]:
[http://chrisdiana.github.io/cms.js/](http://chrisdiana.github.io/cms.js/)

[3]: [https://huytd.github.io/azeroth-js/](https://huytd.github.io/azeroth-
js/)

~~~
bovermyer
...or you could just use whichever one you want, and set up a CI/CD pipeline
to automatically run the build process and publish changes.

Small up-front time cost, then you can just make your change wherever and let
the system do the rest.

------
wheresvic1
Shameless plug: Here's a little tutorial that shows you how you can write your
own Static site generator in around 100 lines of code!

[https://smalldata.tech/blog/2018/08/16/building-a-simple-
sta...](https://smalldata.tech/blog/2018/08/16/building-a-simple-static-site-
generator-using-node-js)

------
anderspitman
As a few others have mentioned, I highly recommend writing your own static
site generator, unless you know the specific reasons you need something more
advanced. It's a fun exercise and was a great learning process for me.

Here's my personal hacky take[0]

You can get pretty far by simply supporting Mustache templates[1], Markdown
parsing (even that isn't necessary, though I did it since my old posts were
already in Markdown), and a metadata format (ie frontmatter, or something
similar. I went with toml files sitting next to my content).

[0]
[https://github.com/anderspitman/assg](https://github.com/anderspitman/assg)

[1] [https://mustache.github.io/](https://mustache.github.io/)

------
ccleve
I'd love to see a graph of the stars over time. Or perhaps a graph of a new-
stars-per-month statistic. That would show which ones are getting more popular
and which are in decline.

Jekyll has a ton of stars, but that's probably because it's been around so
long.

~~~
kaushalmodi
[http://www.timqian.com/star-
history/#gohugoio/hugo&jekyll/je...](http://www.timqian.com/star-
history/#gohugoio/hugo&jekyll/jekyll)

Hugo vs Jekyll: Interpolation is in the favor of Hugo :)

------
tekmaven
Gatsby is absolutely a pleasure to work with. Any react developers should
check it out!

~~~
pinkgodzilla
I tried Hugo, Jekyll and Gatsby. Assuming that a static site is 95% likely a
marketing (self, company or otherwise) site and a marketing site needs to
impress, a static site generator should be first and foremost built from the
requirements of frontend and not leave the user to "theme" some default HTML.

Gatsby is ridiculously fast (React based) and its plugin universe is full of
all the common features you could ever need. It has built in 1-click service
workers plugin for offline access, 1-click plugins for prefetching links you
put on your page, auto-inlined-css (in v2), all kinds of markdown + fringe
requirements like LaTex, video embedding, things like Call to Action plugins,
MailChimp sign-up-here plugins etc. To get a feeling of the snappiness, check
out their landing at [https://www.gatsbyjs.org/](https://www.gatsbyjs.org/)
and their plugins here:
[https://www.gatsbyjs.org/plugins/](https://www.gatsbyjs.org/plugins/) .

The community pushes and PRs at break neck speed every day and is super
friendly - can definitely get the support you need. Lastly, it is a great way
to "inverse learn React" if the objection is "Wow, I don't know enough React".
React by itself is not that opinionated and Gatsby has enough good practices
of putting together a React framework for you to use productively.

ps: the other frontend alternative would be vuepress, it should feel blazing
fast too. Here's another article on why speed is so important:
[https://www.gatsbyjs.org/blog/2017-09-13-why-is-gatsby-so-
fa...](https://www.gatsbyjs.org/blog/2017-09-13-why-is-gatsby-so-fast/#why-is-
site-speed-so-important)

~~~
azangru
> Gatsby is ridiculously fast (React based)

Just wanted to point out that there are at least two kinds of fast: fast to
build and fast to load. And while Gatsby-based sites are indeed very fast to
load (although I haven't compared a Gatsby site with an optimized Hugo site),
they are painfully slow to build.

But it is truly a pleasure to work with; that's for sure!

~~~
pinkgodzilla
In develop mode, hot module reload (HMR) changes the text immediately on the
screen as you edit. But yes, HMR and caching has some glitching once in a
while.

~~~
azangru
Oh, the develop mode is perfect; it's time required for production build that
I was talking about.

------
brillout
I'm surprised nobody mentioned this but this website and the whole JAMstack
thingy is basically a PR stunt from Netlify.

Static sites generators and the JAMstack are inherently crippled.

With a JAMstack, by design, everything needs to be rendered on the client.
This means poor performance on mobile, loss of control over SEO, and virtually
no SMO for dynamic content.

Kinda funny to promote a crippled stack that hard...

------
atmoz
Shameless plug: If you want to organize your content with files and
directories without any configuration files and all that fuzz, I created
PLY[1] this summer.

All it does is convert .md files to .html and optionally uses nested Golang
templates. There are some tricks behind the scenes, like support for tags and
meta data (just like regular static site generators). Flexibility is
concentrated into the templates, so no other files are needed.

I think the content (files) should reflect the structure of the webpage as
close as possible when using a static site generator. When reducing
complexity, we can go all the way down to the filesystem, where files and
directories are the main building blocks. Content and design must be separated
as much as possible.

I have not tested all static site generators out there, but the few that I
tried did not satisfy my demands. So I just made my own (for fun and
learning).

[1]: [https://github.com/atmoz/ply](https://github.com/atmoz/ply)

~~~
sleavey
You might want to consider that the name PLY is already used for a popular
Python parsing library [1].

[1] [http://www.dabeaz.com/ply/](http://www.dabeaz.com/ply/)

~~~
atmoz
Thanks for the heads-up, if my project gets more popular and do not just rot
in my github account I will consider changing it.

------
nickjj
Jekyll has been working well for me. I have around 190 public posts, dozens of
pages and 50+ drafts on my site.

With Jekyll-Assets I work with SCSS and everything becomes minified, along
with getting md5 tagged file names for cache busting with no effort to set up.

When writing a blog post it takes around 2 seconds for live reload to kick in
and refresh the post (which works nicely as a near real-time preview when
writing). A full site build takes around 10 seconds but I only do this when
deploying so it doesn't matter that it takes so long.

The only thing that sucks is for whatever reason I cannot get Jekyll to work
at all with Docker for Windows which ultimately may end up convincing me to
move to a different generator in the next iteration of my site. The devs don't
seem to want to address the issue.

------
ms013
I gave up on these a while ago when I realized a very small amount of
scripting (<100 lines) and pandoc gave me everything I wanted to maintain my
site.

------
Dowwie
Wow. So many static site generators.

A static site generator needs good themes. A static site generator ranking
based just on GitHub stars isn't telling much.

~~~
tonyedgecombe
Themes was the least important issue for me, easy of use was much higher in my
list of priorities.

------
Spivak
Can someone suggest a good static site generator that uses Org files?

I'm looking for something I can have a blog & wiki with that integrates with
how I already take notes. Gollum & derivatives seem alright but very bare
bones.

~~~
souterrain
An article[1] on org-publish[2] made it to the front page of HN[3] just
yesterday, in fact.

[1]: [https://vicarie.in/posts/blogging-with-
org.html](https://vicarie.in/posts/blogging-with-org.html)

[2]: [https://orgmode.org/worg/org-tutorials/org-publish-html-
tuto...](https://orgmode.org/worg/org-tutorials/org-publish-html-
tutorial.html)

[3]:
[https://news.ycombinator.com/item?id=17940393](https://news.ycombinator.com/item?id=17940393)

------
olooney
I don't see it on this list but I think the Hacker News crowd may be the R
blogdown package. (Different than the JavaScript blogdown on the top list; )
The main features for me are good LaTeX support (for formatting mathematical
expressions) and R and Python code blocks for creating charts, etc. It's great
for a moderately technical blog that has equations, data visualizations,
formatted code blocks sprinkled throughout the text.

[https://github.com/rstudio/blogdown](https://github.com/rstudio/blogdown)

~~~
claytonjy
Blogdown isn't there, but Hugo is, and blogdown is mostly an RMarkdown
interface for Hugo.

------
zhte415
Interesting there are many many.

Does pmWiki count? Files are stored as plain text, though it does go through
the php on rendering?

A few months ago I saw a recommendation n LinkedIn to use it for a personal-
wiki, just storing notes and remembering things. I have found it to be really
fast (1G DO node) and super easy to get going and keep doing including from
multiple devices - as long as they've got a web browser they're good to go.

------
petecooper
I look at static site generators every now and again, and I'm totally
overwhelmed at the range. Beyond starting with trying out the popular ones, is
there a way to get into this whole thing without losing my way in the rabbit
hole?

I say this coming from a traditional PHP + MySQL CMS background of 15 years,
the irony of the vast array of PHP + MySQL CMSes is not lost on me.

~~~
bovermyer
Ultimately, they all do roughly the same thing in the same way. They're just
Markdown-to-HTML converters, with some nice quality-of-life features tacked
on.

Just pick one (even just one at random will do), and start there. It's easy
enough to change your mind later.

------
paulddraper
There needs to be a term for "static DOM site generator" or "non-scripting
site generator". (At first blush, I would have called this "static site
generator", but now I know better.)

I.e. something that performs well on all devices, and is optimized to just
providing static data via CSS-styled HTML.

Does anyone know of a recognized term for this thing?

~~~
notriddle
You mean like
[https://bors.tech/documentation/](https://bors.tech/documentation/) ?

That's generated using Jekyll, and executes exactly zero lines of JavaScript.
I think most static site generators, except maybe Gatsby, can do that. Just
don't put any script tags in your template.

------
benbristow
I love Jekyll. Made my own site using it integrated with Webpack too.

[https://www.benbristow.co.uk/](https://www.benbristow.co.uk/)

[https://github.com/benbristow/benbristow-
website](https://github.com/benbristow/benbristow-website)

I kind of cheated at making a 'static site' though as I'm using PHP for some
dynamic stuff like my contact form and latest Instagram posts (but that's via
AJAX)

~~~
blocked_again
Checkout netlify. They support forms without you having to run a backend.

~~~
benbristow
I can host my own website on my own server.

Why would I want to restrict myself to a third party's servers?

------
davepeck
Does anyone have a good theory about why (1) there are so many static site
generators and (2) market share is so widely distributed? Is this a case where
(1) it's easy to build static generators and (2) everyone's needs are a little
bit different... or are there other dynamics at play?

Also, static generators and bundlers (webpack, parcel, etc.) strike me as
needing to solve many related problems. Do we believe there's a meaningful
integration to be reached down the road?

------
ssivark
I've hardly blogged in the last several years, but I've tried out half a dozen
static site generators (SSGs). I think it could be a nice way to
introduce/familiarize yourself with a programming language, beyond just the
toy exercises. Once you understand one SSG, they're all very similar in
essence, so it becomes a good way of getting up to speed with language
features and idioms -- at least in theory.

I'm currently playing around with Frog (Racket based SSG).

------
robohoe
I found Hugo to be a convoluted mess. Pelican on another hand was very easy to
get started with. Plus it's written in Python so debugging it is easier.

------
bovermyer
It would be nice to be able to exclude certain things in a search.

For example, I don't want to see options that are written in JavaScript or use
the AGPL license.

------
nmca
I did a crazy thing and used sapper[0] for a recent static site. It has a beta
feature that allows for exporting a static page, and it worked really well for
me. Fast, modular, es6 and little setup. Would definitely use it again.

[0] [https://sapper.svelte.technology](https://sapper.svelte.technology)

~~~
jhoh
Working Link:
[https://sapper.svelte.technology/](https://sapper.svelte.technology/)

------
deltron3030
I like the mindshare of the Jigsaw generator with Laravel, it uses the Mix
bundler and Blade templating, basically Laravel without the backend stuff. It
might be a good choice for people who want to start with a landing page before
going full saas. Strange that it's not more popular..

------
gandutraveler
Is there a SSG plugin built on top of rich text editors like docs to just
publish/deploy static web pages?. I remember buildin static website's for non
tech friends and maintenance/keep up over time is always painful for them.

------
scanr
I think react-static is pretty good if you want something relatively close to
the metal

------
theknarf
Working on my own static site generator, and wow, there's a lot of them.

------
mo3gut
One not on the list is Template::Toolkit. Perhaps it's considered too old-
school.

TT is stable, available virtually everywhere and (like perl itself) is well
documented and works without fuss.

------
nottorp
So what would be the recommendation for something that generates static blog-
like pages? Assume I know nothing, or maybe python and a liiiittle bit of
jinja.

Thanks!

~~~
ianwalter
Your requirements made me think of Cactus
([https://github.com/eudicots/Cactus](https://github.com/eudicots/Cactus)). It
was pretty nice but I don't think it's being actively maintained anymore.

~~~
nottorp
Definitely, www.cactusformac.com is even offline :(

------
varjag
Thanks for this.. had no idea Coleslaw exists!

------
tonyedgecombe
I miss Joel Spolsky's CityDesk software, it was only viable for a single user
but it worked well in that scenario.

------
smakosh
Gatsby js Jekyll Nuxt js Pelican Hugo

------
ganeshsurfs
Why not try [http://ngDocumentor.github.io](http://ngDocumentor.github.io) ?
It needs no generator. Works as a SPA. Works as a Offline app (PWA). Custom
routing feature, simpler search. More just one json config file to set up the
whole site. Serves markdown files on the fly. Try it you will love it. Works
on Github/Gitlab pages as well. No root access required.

