Hacker News new | past | comments | ask | show | jobs | submit login
Static Site Generators (staticsitegenerators.net)
182 points by zx1986 on May 15, 2014 | hide | past | favorite | 120 comments



Apparently the site about Static Site Generators is experiencing application problems and is unable to serve content at the moment. Should I be amused or enraged?


This feels like irony. Is this irony?


It would be a better case of irony if the site were using a static site generator instead of a web app. That sounds a little unlikely though:

"Site about statis site generators taken down by static site generator scaling issues."


The site uses DocPad, a static site generator.

The downtime was caused by the YAML file having invalid syntax so it would not parse. Whenever a modification to the YAML file is made, a github post hook is sent to the server telling it to regenerate the website.

Normally this happens smoothly without anyone noticing any downtime, while maintaing awesome performance.

In this case because of the bad YAML, DocPad crashed, as it was told to, and the logs showed the error.

I was sleeping at the time so did not notice the issue.

The latest version of the website now handles this gracefully, using the latest successful data if the YAML is bad, as well as showing an error message.


oh the irony...


Static site generators seem like music databases, in that everyone eventually writes their own crappy one that just barely scratches the itch they had (and I'm no exception).


Now that you mention it, building a static site generator would make a great learning exercise for a new programmer. Since they are a fairly common personal project, there are a lot of examples from which to examine.


Indeed! While I learned a lot from Rails' because of how it prescribes a certain structure and approach, the size of it all and the 'magic' that hid a lot of (important) detail was probably suboptimal.

Now I'd been building websites for a while, so I'd already gone organically through the whole 'hey let's use php to cut my pages up into reusable modules', 'I can automate this thing here', 'plugins are awesome!', and 'hey what's this MVC thing'.

But for people starting from less, a static site generator might be more explicit and less complex to learn with.

The mere fact that there's often a 'build' step that converts your stuff to plain html, javascript and css, I find, makes beginners feel like they understand things a little better.


I wrote one when i was at school, probably 1997 or 1998, to help a friend build a fan site for the Longpigs [1]. I assumed it was long lost, but apparently he took it to university with him, and the web archive caught it:

http://web.archive.org/web/20010519223318/http://users.ox.ac...

I think all the content was in handwritten HTML, but the generator knew enough to be able to do the navigation links and sitemap and so on.

[1] http://en.wikipedia.org/wiki/Longpigs


I made one last weekend with nodejs and express, at least it's a good exercise for stretching your muscles in a new programming language.


Is ther any CMS/blog/... type of thing that would create flat files, but keep all the content also in DB?

That way search and comments (and especially moderation for comments) would be easier to handle, but still it would be easy on the server.

For my own site I created something like this, https://github.com/Harri/Spage , but instead of DB, I used another set of flat files (serialized arrays containing the page content + some meta data) for management purposes.


> Is ther any CMS/blog/... type of thing that would create flat files, but keep all the content also in DB?

Both Drupal and Wordpress have modules/plugins that produce static pages:

* Drupal: https://drupal.org/project/boost

* Wordpress: https://wordpress.org/plugins/wp-super-cache/

They're both quite mature and the standard practice for websites that get a lot of anonymous traffic using their respective CMSes.

An alternative (or supplement) to them would be something like Varnish: https://www.varnish-cache.org


There is also a WordPress plugin for generating static pages to upload later, but it's got a lot of gotchas and doesn't seem to have been updated recently. I'm using on my site.

http://leonstafford.com/wordpress-static-html-output-plugin/


Usually that can be achieved with a cache like Varnish. One of the biggest benefits of static site generators is that the only software you need on your server is a web server. As soon as you want to start adding things like search and comments, you lose that benefit.


You can use third party tools for both search (e.g. google site search) and comments (e.g. discus). Of course, if you want to customize things further with user-supplied content, at some point you'll need a dynamic backend.


I hacked up a simple commenting system for my static site, modelled after disqus but far less featureful:

http://github.com/skx/e-comments/

As used on http://tweaked.io/


I wrote a very rudimentary Django module which does that:

https://github.com/stucchio/Stiletto

No idea if it works with the latest django, I haven't used it since roughly 1.4.


DocPad is a little more involved to get running, but does something like what you're describing: https://github.com/bevry/docpad


I've been hacking on Spontaneous CMS for a couple of years now:

http://spontaneous.io

It renders to static files by default (as well as compiling+compressing assets etc) and you can define any number of separate outputs in multiple formats (e.g. HTML, JSON, Javascript, XML, RSS etc) which will also be rendered at the same time.

Plus a whole world of other features, some I consider to be relatively revolutionary. </IMHO>

It works well but lacks, (really, really seriously) lacks, documentation.


I am currently building a static-file blogging system based on Prismic.io and Middleman. It's going pretty well.

The hardest part is that we are going to have a build server that rebuilds the stale parts of the site every hour or so - I don't think that's been done with Middleman before, so we're building that from scratch.

I'll post the details on https://tech.bellycard.com when we're done with it.


Caching has killed the need for SSG's for the most part. You can cache Drupal or Wordpress or pretty much anything with either plugins/modules or via a proxy like Varnish. These things work, generally, by copying the dynamic page and serving up a static page until they detect the page has changed or the user is requesting dynamic functionality (trying to post a comment, log in, etc).

So you get the best of both worlds.


I interpret the groundswell interest in the SSG a testament the CMS does not address all the needs in the content publication pipeline. Some organizations have a focus on content creators. Others on developers. In general, the hacker mindset has an allergy towards ecosystems that remove control. The SSG is about providing a framework for the developer to assert control and regaining flexibility to deliver content independent of coding to a "system".

The CMS is a crutch. It has its place in certain organizations. But it is overkill for many use cases.

In truth, however, we shouldn't be pitting the SSG against the CMS. I believe the next leap of content creation is a mixture of both SSG and classical CMS. Check out the following links:

https://github.com/thyb/contentify https://www.contentful.com/ https://prismic.io/

There is a convergence about to happen between "dynamic" content and the SSG. It could be called CMS as an API.


Unless you want to host a site for peanuts on S3...


Movable Type does this.


Moveable Type was the first blog system I used, over 12 years ago. Oh the memories... my first exposure to Perl and setting up sites on a shared host. Slacking off in university labs to tweak the theme files/write posts/work out why site rebuilds were taking a stupidly long amount of time... fun times :)


Is there anything more modern that also does this (generates flat files from a database that can then be uploaded/served statically)?



Fog Creek City Desk used to do this - 10 years or so ago.


I'm really pleased with FrozenFlask. It lets you develop a normal site with python and flask with all of the flexibility: routing, databases, modules, etc. that you'd expect while still outputing a static website. I made my current blog site with it.

https://pythonhosted.org/Frozen-Flask/ https://github.com/bendoan/bendoan.me


Did you need to write any URL generator, or was it able to identify all URLs by itself?


You need to write simple flask routes for the different pages, but nothing complicated. Frozen Flask will automatically find all of your pages.


I didn't see Hakyll [1] on the list. It is a minimal static site generator written in Haskell. I have just set it up for my first personal site [2]. It is my first experience using a static site generator, and so far I can highly recommend giving it a go.

[1] http://jaspervdj.be/hakyll/ [2] http://willsewell.name


When I was reviewing existing static site generators I couldn't make Hakyll install - but this was back under Squeeze (Debian).

https://github.com/skx/static-site-generators


Did you try and install the package "haskell-platform"?

That's probably the easiest way to get Haskell up and running. Then it's a simple matter of using cable to install other libraries, including Hakyll.


My memory is hazy, so I cannot say for sure. The fact that I didn't document that as a requirement suggests that either I didn't know it was, or that I did, but it didn't help.

Either way I will revisit this now there is a new Debian stable, and I can install the package natively without using cabal.


My 60 yr old mother runs 2 small nonprofits, and is responsible for the web content and design. She's a pro with Word Perfect, but gets confused by simple HTML tags, and no interest, time, or aptitude to learn HTML/CSS/JavaScript.

Last weekend, she asked for help with her website, and I was shocked to find out they still look like they're out of the late 90's. She does all of her editing with a 2006 copy of dreamweaver in WYSIWYG mode.

I'm a huge fan of Jekyll, but she is scared by the Liquid/markdown syntax. I was thinking of moving her to Visual Studio for Web or KompoZer. Anyone know a better HTML editor with WYSIWYG mode and modern, beautiful templates or can recommend one of these all 243 generators?


You might like webhook.com.

We're launching in about a month. Basically, we're a static site generator with a CMS. You don't even use YAML or front-matter. Just build your forms with a local GUI, then pass yoursite.com/cms/ over to your Mom so she can edit in a wysiwyg (or markdown...whatever). Design with normal css/html and Django style templating.

I built it because I loved static site generators (some great tools in that list), but they were all worthless for me as soon as I needed to pass the site off to non-hacker friends. I wanted it to be easy on me and easy on them. Using firebase and ember, we were able to load the entire CMS off a static server (we still need a server to regenerate on changes though).

And before you ask, yes we're trying to figure out how to make it self-hostable. It's a little harder for us, since we use a bunch of separate services (firebase, elastic search, google image resizing...etc) to make it so you don't need to install much locally, just Node. Small team at the moment, trying to avoid VC investment and went straight to Kickstarter.

For everyone else who just likes SSGs and don't need a CMS, I'm a big fan of Harp and Cactus. The later because I came from a Django background.

If you're looking at a WYSIWYG from a design standpoint you might like something like http://macaw.co/


Do you think "webhook" might be kind of a confusing name? That's already a thing, and a different thing at that. It sounds to me like a model of automobile called "Motorcycle".


(Sorry for the shameless self promotion ... If anyone thinks it's inappropriate, down vote me:) )

Looks like Mailpin (http://mailp.in) is what your mother needs.

Does she know how to send email? If yes, then she just sends a mail to p@mailp.in, and the mail she sends become a web page like this: http://mailp.in/c8cN1BEb



Here's an interesting editor that I stumbled across recently, can't wait to use it somewhere: http://madebymany.github.io/sir-trevor-js/example.html.

Rather than offering extensive formatting options, it supports blocks for different types of content. This should make it easier to integrate into well-designed template without fear that the user will break it by abusing formatting, while still allowing to arrange the content freely.

It seems like it would be easy to integrate it with some simple back-end:

> The content of the editor is stored as markdown inside a JSON object, with the structure and the contents of the post serialized inside of it.

And, albeit it's not strictly on-topic, seems like you might be interested in just using a website builder. I don't know about pricing in this area of business, though. From the top of my head I remember http://www.weebly.com is one of these.


I always liked Spolsky's CityDesk for this scenario, sadly it has been abandoned for a long time now.


Can't say if it's better, but one i've used that's super easy is WebDwarf: http://www.virtualmechanics.com/products/dwarf/


I haven't used WebDwarf, but I've been asked to make changes to a site someone created with one of Virtual Mechanics' other products, SiteSpinner Pro and have been pretty horrified.

The HTML it spits out is basically a bunch of absolutely-positioned divs, apparently in whatever order things were edited in. That means that a box, a headline within that box and text following that headline are all in completely separate locations within the file. Completely unmaintainable unless you also have their software for further edits.


You should take a look on Pikock. http://www.pikock.com We have a different approach on reliability and simplicity to build your website without coding


I have a project that combines Jekyll with a rails app for editing as well as email hooks so you can create/post from an email a la Posterous.

It's currently offline but I can send you the code.



Is there any static site generators for photos? Something like "host your own flickr"? Something that uses exif tags, directory hierarchy, etc to make a static browsable list of your photos?


Jalbum http://jalbum.net/en/software/features

It's been about 10 years since I last used it, but looks like it's still basically the same thing; reads your photos directory, creates html pages with thumbnails and links to bigger pictures based on the directory structure. Can display EXIF data next to the images if you want.


Build your own. I've written something like that. It's not static, because I don't want to have to rebuild everything just 'cause I added a new photo, or fix a type. However, you do literately just use the file system to add and manage photos. I won't link to it because I don't want to link to my real ID.

But it's pretty simple. You just have to recursively go over the folder, and get each photo. Make sure there is a thumbnail, and build your HTML.


It's not static, because I don't want to have to rebuild everything just 'cause I added a new photo, or fix a type.

Some generators (e.g. gostatic) can track changes and dependencies, rebuilding just what changed.


Yeah I was gonna do that, but wanted to check if anyone else had done it before I reinvent the wheel. :)


Where's the fun in that? Re-inventing the wheel to scratch your own itch is part of the process of improving yourself as a developer.

:p


There aren't many tools like that.

Personally I like and use `lazygal`: http://sousmonlit.zincube.net/~niol/playa/oss/projects/lazyg... Source: https://bitbucket.org/niol/lazygal

It's live and maintained. I also contributed some code fixes and theme to it.


I can highly recommend Photofloat by Jason Donenfeld:

http://git.zx2c4.com/PhotoFloat/about/


I've built a Flickr plugin https://pypi.python.org/pypi/pelican-flickr for Pelican. You can embed your photosets alongside your posts & pages...


If you are familiar with Jekyll, I have made a plugin for Jekyll, for easy album generation. You just need to put your photos in a folder, and the web page can be generated. But you need to customise the theme yourself.


Could you post a link to your plugin?



I've been quite happy with https://pypi.python.org/pypi/curator


You may give Sigal a try: https://github.com/saimn/sigal/


I've been using Pelican as my static site generator of choice, but I'm frustrated that Markdown and ReStructured Text are the only formats it can handle. I chose ReStructured Text over Markdown, but what I really want is to write org files. I've been meaning to roll my own solution in Emacs Lisp using org-publish plus some custom functions to generate RSS feeds, but I haven't gotten around to it yet.


I found a cool project called org-page that looks pretty good. https://github.com/kelvinh/org-page

I have some concerns about its architecture in that it's too integrated with git repositories, but it looks like a great place to start from.


It would probably be pretty straightforward to just write an org adapter as a Pelican reader plugin:

http://pelican.readthedocs.org/en/latest/plugins.html#how-to...


IIRC Pelican also works w/asciidoc.


I did a doubletake when I was skimming the list and ran across a blogging engine written in Fortran.


Something similar: http://staticgen.com/

Same idea, but staticgen.com is a little easier to navigate but don't think it's quite as comprehensive.


Great, now someone's gonna write a static site generator site generator... when does it stop?! There's got to be a list of site/project ideas that people have actually asked for.


Thanks for the mention - we're working on a new version that'll be open-source and more comprehensive (though still limited to open-source static site generators).

Stay tuned :)


I like the additional info on that site! Would you want to consolidate efforts and use:

    https://github.com/jaspervdj/static-site-generator-comparison/
as an underlying list, too? Maintaining a listing is pretty tedious with all the SSGs out there. I can set up web hooks and whatever to push to your servers if the listing changes.


Missing Frog!

https://github.com/greghendershott/frog

Fun little list :D


Random observations:

- Aren't Jekyll and Octopress basically the same thing?

- Really impressed at how fast Metalsmith is growing. Might have to give it a try soon.

- For now I give my vote to Middleman.


Octopress is built on top of Jekyll and is geared towards making blogs to host on Github Pages (they'll run jekyll, but not any plugins, so you need to have a weird deployment setup if you want to use things like Haml and Sass). Jekyll itself is more of the lightweight, no-frills vanilla version.


Octopress runs just fine without github.


Any good observations what differences there are between Metalsmith and Assemble?


I am a Python beginner (being a Java dev day-jobber I've been so for more than a year now) and I badly wanted to have a good static site generator written in Python so that I could learn/practise Python while using it, by tweaking it to my needs. I was surprised to see the lack of support and documentation Python site generators suffer from - even Pelican which is a distant third on the pedestal (of stars in the list). I finally settled with Jekyll as even starting was difficult in one of those Python site generators. So seeing Jekyll having close to 5 times the stars the top Python static site generator has in that list is not surprising.


Wow, big list, I have tried a whole bunch of those but my favourite by far is Hugo using Go.

https://github.com/spf13/hugo

I don't know why but using a single binary is awesome!


Yes, single binary is a great feature. All Go-based static generators share this feature (and they are pretty fast).


Single binary + multi platform + awesome documentation = yes please, I'd like some more.


Hey, mine isn't in the list! :-)

https://github.com/wtracy/hablog

That said, it was only ever intended as a toy project, so it probably doesn't belong here.


My "Make Here CMS" is also not on the list:

http://kephra.de/blog/Make_here_CMS.html http://kephra.de/src/Make-here-CMS-shar.txt

The idea is, that a minimal static site generator can be done by a recursive Makefile and a here script.



I'm being semi-facetious, but when it first started out it did all this stuff and deployed it to your website as well via FTP.


If you are interested in a site which creates a Jekyll blog, and installs it on GitHub for you, and has an Android app that acts as the correlate to the Wordpress app (and is open source) then check out http://teddyhyde.com. http://blog.teddyhyde.com documents how to modify the Android app if you want to help hack it.


(Shameless plug) I maintain Zas, a Go static generator. I checked the other projects in Go and I must say it's funny to see how different are our approaches to the very same thing :)

The only big difference that makes Zas stand out is its more Unix-like spirit in how it handles extension through commands as plugins.

I'll check the list in the future and try to adquire some more "skills" for Zas.


I'm a Ruby developer and interested in creating a business in this space.

Specifically a online-CMS that generates static html uploaded to a CDN. The target market is businesses who need to know their content is "uncrashable" and "infinitely scalable". The price point would be >$100/mo.

Get in touch with me if you are interested in that idea.


I have a similar idea and your pricing is on track. Most people seem to price according to cost and think they're clever charing $9/mo. for hosting.

The technical side is not particularly difficult aside from dealing syncing and maybe failover. What is trickier is probably the CMS side because building a CMS is like the definition of feature creep. Eventually people want/get every feature under the sun, even if that doesn't really scale.

You probably have an interesting business there, but managing customer expectations and finding the happy balance in terms of investment is tricky.

Also, the customer acquisition side of the business is somewhat tough, but worth solving.

Good luck!


That sounds like a feature not a product.


Lol at the downvoters. I'm sure you can build a lifestyle business around a CMS that spits out a static site but honestly, unless your audience is Hacker News, people don't care whether it's static or dynamic and often times they'll ask for that one thing that isn't static and breaks your ability to sell to them.

So yes, this is a feature and not a product as evinced by the numerous plugins and projects that take existing dynamic web application software and can produce static sites (Flask Freeze, Drupal's plugin, I think even WordPress has one).

[EDIT] Which means, what's to stop the existing "site builder" companies from doing the same? They don't sell the feature (static builder from a dynamic site), they sell the product (build yourself a site), and people buy it. The "background benefit" is a slightly faster site and who does that really matter to? Not the customer. The service - reduction of bandwidth and server resources; the could easily introduce the feature, cut resources, and keep the margin.


Here is something I made in php,

http://imakesnowflakes.com/vodka-introduction.html

I made it because I found the existing ones unnecessarily complicated, for doing something trivial as converting a bunch of markdown files into html.


This is slightly off-topic, but are there any rich-text web editors that output to Markdown?

I rarely need the full featureset of Markdown and would prefer a simple editor that gets me half way there, while still ultimately outputting Markdown for storage/use in something like a static site generator.


http://md-wysiwyg.sourceforge.net/ might fit your needs? There's a link to a demo page under the second header.

It's a bit primitive, but I guess that's the point. Be sure to hit the "Return markdown text" checkbox.


The options for wysiwyg Markdown editing are few; they’re listed here.¹ Rich text editing for Markdown, still is an unsolved problem.²

¹ https://github.com/rhythmus/markdown-resources/blob/master/m...

² https://github.com/quilljs/quill/issues/74#issuecomment-4294...


Cool. I'll check it out, thanks!


Quickly scanned through - pretty sure jinja is a templating engine, not a static site generator...


You're right, thanks!

    https://github.com/jaspervdj/static-site-generator-comparison/commit/610b1b35742a281a84bfb18cf026842d1b92bf67


Also, the link to Heckle is dead. Did you mean my Heckle? https://github.com/marijnh/heckle


Not sure, I assume so. I think it was part of a bunch of SSGs imported from another listing.

    https://github.com/jaspervdj/static-site-generator-comparison/commit/96f23ed30db97067feb42b2f9100ec48c2596eb6


I've been using Octopress for a while now. It's super nice except for one major gripe which is that as the number of posts grows it slows down to a crawl. Other than that I'm totally happy, but a 5 minute wait to fix a typo gets old quickly.


I wrote a post on some of these a little while ago,

http://codecondo.com/7-static-site-generators-for-building-w...

only featured stuff that the majority of developers use.


I've been wondering, with so many static site generators, isn't there one geared toward the "brochureware" market? I'm thinking of something that is very easy to use and maybe imposes rigid assumptions for non-technical people.


Could you share more details as to what kind of assumptions you'd expect?

I suppose it wouldn't be to hard to use any of the existing static site generators and either 'repackage' them with specific assumptions, or write a module that implements them...


Oh my, thanks for remembering me that I've started a static site generator 3 years ago and never finished it (https://github.com/bpizzi/Hydrastic).


Your browser as the static site generator; http://composedit.net/ - for when even running the static site generator itself is too much effort!


This creates empty pages to be filled with Javascript.



I use gulp with gulp-nunjucks-render as my static-site generator. It offers the most flexibility to me and in the end any static-site generator is just rendering templates.


Check out Pikock: http://www.pikock.com/

It's a static site generator all made with Ruby on Rails and AngularJS for the front.


another one of these resource lists sites eh (do we have a general list/information curating problem?) Normally I would be in this posting http://modernstatic.com/ as a long standing index of static generators but hm..seems to have been neglected/let expire..and I can't remember who created it.

http://staticgen.com is a decent alternative


Awesome list! I've been using jekyll for about 2 years and I really like it. It's crazy that Jekyll is number 1 and 2 considering Octopress runs on it.


It lists my generator! Yay!

(Note: I use Ultra Simple Site Maker for my own website, but I wouldn't recommend you do at the moment. It's not very flexible right now.)


It would be more useful if we can filter the list by Stars, License, Language, Created, Updated.


Click on the headings?


That's sorting, not filtering.


Enable JavaScript, and then click on the headings I think you mean.



+1 for Blosxom.

Does anyone else use it?


Isnt PICO (picocms.org) a good fit for this list ?


got my sideproject for you list www.landinggear.me


This one is missing "https://sites.zoho.com/"




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: