Hacker News new | comments | show | ask | jobs | submit login
An introduction to static site generators (mickgardner.com)
31 points by mickgardner on Apr 27, 2011 | hide | past | web | favorite | 14 comments

Small example: at videolan.org (7,3M VU) we have a php website that is generated (by a custom generator) into static html with a svn/git post-commit hook. It works perfectly fine and can manage huge loads...

I kind of disagree with the OP for a few reason:

> You can’t update your website unless you’re at your computer where the static site generator software is installed

We use svn/git post-commit hooks for this. The generation is done server-side.

> You can’t have local comments, pingbacks, non-google site wide search, contact us forms (without some dynamic code etc)

True, but for example, we have some dynamic pages for forms.

To me, this only make sense if you don't have many interactions (comments) and if the website isn't updated 300 times/day. But it is a nice solution.


Marco Arment (co-founder of tumblr, creator of instapaper) is also working on a static site generator called Second Crack http://www.marco.org/secondcrack . What sounds cool about that is that it has a friendly dynamic backend that generates a static site. He's trying to get the best of both worlds.

The most strange (but interesting) static site generator I’ve ever seen is: http://mearie.org/about/mearie#technical-detail . It uses Apache’s mod_negotiation very well to support internationalized contents. (That site provides English, Korean and Japanese version for most contents.) You can read the source code from here: http://hg.mearie.org/mearie.org/current

I am the author of that website, and I must say that that's basically a huge mess with Makefile, Apache, Mako, Pandoc and Mercurial. ;) They served me well however, and with services like Disqus I think most personal websites can be made of static contents entirely. (Well, I do not use Disqus but I do use Tumblr with a theme synchronized to my main website.) Someday I'll try to package my solution, but that is an another story...

wow that is strange. i like the mako teplating though.

A few months ago the NY Times wrote an article about how they did static generation for their election results mini-site. The HN discussion was here: http://news.ycombinator.com/item?id=2025611

Two other major advantages of static site generators.

First, security, particularly compared to wordpress.

Second, you can host the resulting HTML anywhere, for instance, a subdirectory of a web server you don't want to write a blog engine for. my corporate site is powered by Nitrogen (Erlang) and I just whipped out a Jekyll template this week for the blog we're adding - then we can host the blog under that site without having to go write a blog framework in Erlang.

Also recommend Hakyll! http://jaspervdj.be/hakyll/

The "configuration" is a Haskell program that uses the Hakyll library as a DSL.

I use it for my home page: http://chrisdone.com/

Sauce: https://github.com/chrisdone/chrisdone-homepage/blob/master/...

For anyone who's interested, I've been working on a static site generator called Bolt (http://usebolt.com/), which is more like a Sinatra clone which outputs static HTML (rather than being aimed at bloggers) giving you a lot of flexibility!

I chose nanoc over jekyll because it has support for haml, sass and other stuff. Webgen has similar flexibility, the latest version has a web interface to edit the markdown files and generate the site.

I recently finished converting my main site (personalmba.com) to Jekyll from Wordpress.

Once I learn enough Sinatra to build a user creation / login system similar to Wishlist Member, I'll never use Wordpress again.

I assume "GitHup Pages" is meant to be "GitHub Pages".

fixed. thank you.

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