share
Stack OverflowBest Static Website Generator
[+67] [26] Nick Retallack
[2008-10-09 07:43:44]
[ web-development static ]
[ http://stackoverflow.com/questions/186290] [DELETED]

In the age of dynamic websites built with layouts and templates, nobody wants to write plain old repetitive static html anymore. But now that you can outsource dynamic features to services like Disqus [1], and you could get slashdotted/dugg/reddited at any moment, sometimes a static website is best for scalability.

There are quite a few static website generators out there that let you use templates, layouts, alternative markup languages, and other new age stuff. So this question is a bit of a survey. Which do you think is the best, and why?

Here are a few examples to start us off:

  1. WebGen [2]
  2. StaticMatic [3]
  3. Static [4]
(4) Community Wiki? - Greg B
(2) Done. I still can't decide which of these things to use. - Nick Retallack
(3) My criteria are 1) It leaves your data where it is, in the format you choose. 2) You can edit the basic site and page layout just as you would for normal HTML (no magic Layout definition language) and 3) It plays well with the rest of your tool chain. - AndyT
[+29] [2009-04-15 15:02:08] barry

StaticMatic [1] and Static [2] are lesser known. There are more done in Ruby...

I just used nanoc for a little project and it was pretty nice.

Don't forget aym-cms (Python), and the others in Perl that have existed since the dawn of time (like the aforementioned WML).

[1] http://staticmatic.rubyforge.org/
[2] http://static.newqdev.com/
[3] http://nanoc.stoneship.org/
[4] http://webby.rubyforge.org/
[5] http://github.com/mojombo/jekyll/tree/master
[6] http://github.com/blog/342-hyde-the-python-static-site-generator
[7] http://hobix.com

(2) But does anyone have a recommendation? Should we split suggestions into separate answers so people can vote on them? - Adrian Mouat
Agreed with Adrian. Also, Hyde has its own website now: ringce.com/hyde - Cawas
(1) +1 for nanoc. That thing is stupid easy to use, it's flexible, and has excellent documentation. - Dan Esparza
1
[+6] [2010-03-02 10:14:54] Oben Sonne

Poole [1] is another one. Conceptually it's something in between plain Markdown to HTML conversion and more sophisticated site generators like Hyde [2].

Poole uses one global HTML skeleton file to inject the HTML versions of Markdown source pages into. Poole has basic support for generating content by embedding Python code in page source files. This is a dirty merge of content and logic but a pragmatic solution to get things done fast for simple sites. No need to learn a template or preprocessing engine.

Poole may be a good choice if you are familiar with Markdown and Python and if you want to build a rather simple site with only a spot of generated content.

[1] http://bitbucket.org/obensonne/poole
[2] http://ringce.com/hyde

2
[+5] [2008-10-09 08:04:08] Greg Hewgill

I use ikiwiki [1] as my wiki software, which in contrast with most wiki software generates a static view of the wiki. Whenever you make a change, it reruns the generator program that generates new versions of any static pages that need to change. It's not designed for huge installations like Wikipedia, but certainly for small to medium size wikis it works well.

[1] http://ikiwiki.info

3
[+4] [2008-10-09 12:15:42] Tometzky

Here is another example: Bricolage [1]

A static web page is also much more secure than a dynamic one. Nobody would be able to deface one. There is no need for security updates either. Go static!

[1] http://bricolage.cc/

4
[+4] [2009-11-04 19:57:02] igotmumps

I'd like to add CityDesk [1] from FogCreek Software.

Though no longer being updated, it is an incredibly easy to use little system that lets you crank out static websites at a pretty quick pace. Some of the features are a bit dated, but I like the simplicity of it's scripting language and templating system.

Michael

[1] http://www.fogcreek.com/CityDesk/

5
[+4] [2010-04-13 08:57:28] Oliver Haag

For simle static Site I can reccomend nanoc.

I've done such a static site with nanoc about 2 years ago. The documentation was good and I got it done quite fast. I had to handle a little problem with the directory structure, but as far as I can see this is solved in the current version anyway.

An alternative may be jekyll. ruby-toolbox says [1] that this is the the most popular ruby site generating tool. But jekyll seems to be more complicated and overkill if you don't need blog features.

Anyway ruby-toolbox is a good starting point to look for alternative solutions.

[1] http://ruby-toolbox.com/categories/static_website_generation.html

6
[+4] [2010-09-27 20:27:02] Alain O'Dea

wget --recursive (with --base to relativize links) or curlmirror.

If you already have a working site written in CMS that has a RESTful interface (like Zotonic) you can make a static snapshot of it with wget --recursive (with --base) or curlmirror.


(4) This solution is ghetto fabulous - Nick Retallack
7
[+3] [2010-11-26 02:11:37] Matt Helmick

Two excellent new static site generators are Middleman: https://github.com/tdreyno/middleman and Frank: https://github.com/blahed/frank

Both of them are based on the Sinatra Ruby Framework.


I can recommend Frank. Some rough edges but all in all a great tool - asymmetric
8
[+3] [2009-05-28 06:50:40] thedz

If it's a simple blog, a while back I wrote a quick Python utility that would generate static pages:

http://github.com/dz/chisel/tree/master

My primary goal was to make it easy to extend and edit, hence the relative few number of basic page types it generates.


9
[+3] [2010-04-21 15:41:15] David Dorward

I swear by ttree [1]

[1] http://template-toolkit.org/docs/tools/ttree.html

10
[+2] [2011-02-07 18:13:53] David

The thread is a bit old, but it looks like it's still being updated. When I search Google for "static site generator" it's one of the top links listed! So ...

I've been looking for a PHP-based static site generator. (The Ruby ones seem to be flavour-of-the-month!) About the only one I've found is Stacey [1]. I'm not even sure there is much be way of alternative in the PHP world. I would be interested to know of others, though.

Meanwhile, I hope Stacey is a worthy addition to this list.

[1] http://www.staceyapp.com/

Another option will be Phrozn - static site generator in PHP. I just recently pushed first public release, but it is already worth checking. - Victor Farazdagi
11
[+2] [2011-03-04 16:01:53] AndyT

It's a late addition to the crowd, but WebDibbler (http://www.webdibbler.com) is a Java package with GUI font end that adds templating tags (include, loop, conditional, expression evaluation, multi-pass rendering) to standard HTML. It makes no constraint on the type of page being generated, and simply allows more complex websites to be built up from smaller fragments.

Plans include Ant task and direct Java API integration, as well as a number of markup/data source extensions.


12
[+2] [2010-04-21 15:38:20] nwah

Frank [1] it has cool helpers for prototyping fast.

[1] http://github.com/blahed/frank

13
[+2] [2009-05-28 06:42:00] Vihang D

If you are looking for python based tool check out Tahchee [1]. It uses Cheetah template system.

[1] http://www.ivy.fr/tahchee/

14
[+1] [2008-10-09 12:30:26] timday

"Website Meta Language" [1] (often confusingly shortened to WML, despite being absolutely nothing to do with WAP) works well for me. apt-gettable on Debian [2].

[1] http://www.thewml.org/
[2] http://packages.debian.org/etch/wml

<offtopic> And it has nothing to do with yet another WML (wesnoth.org/wiki/ReferenceWML). </offtopic> - jetxee
15
[+1] [2009-11-06 04:24:10] Nomad Coder

After searching around for a static site generator (I only wanted to use Ruby, which essentially limited the scope), I had a very positive experience with Webby. I made a "really-static" site with it ( playcode.nl [1]), as well as a blog (not-so-static, with the source code kept on github - blog.writelesscode.com [2]). What I liked about it is extended set of features. For example, you can combine filters for the same page (no problem to use ERB together with Markdown). Nested layouts? No problem. Code highlighting worked well, too. And after all, the source code is pretty readable (although it feels a bit Java-ish to my opinion) - so, I could easily add a feature that I was missing (which was extracting excerpts from posts on the index page of the blog).

[1] http://playcode.nl
[2] http://blog.writelesscode.com

16
[+1] [2009-11-08 19:54:51] ak

Two python based ones: blatter [1] and lanyon [2].

[1] http://bitbucket.org/jek/blatter/
[2] http://bitbucket.org/arthurk/lanyon/

17
[+1] [2010-12-01 21:18:38] Nick Retallack [ACCEPTED]

Mako [1] and Jinja [2] include all you really need to generate a static site.

[1] http://www.makotemplates.org/
[2] http://jinja.pocoo.org/

18
[+1] [2010-04-21 16:05:51] cato_minor

Ages ago, I used filepp [1] for quickly including content. It looks like a generalised C preprocessor. It still works, and is still available in Debian.

[1] http://www.cabaret.demon.co.uk/filepp/

19
[+1] [2010-08-24 15:16:05] Antony

let me recommend you templeet [1] makes it real easy to build static sites without imposing any structure combined with the ability to integrate php code/routines and a large set of tools to deal easily with authentication and database integration. To build a website from small to large, is still what I'd recommend because it can be as simple as building a static website with the ability to call any php when ever you need generating at the end a static website.

[1] http://templeet.org/

20
[+1] [2009-08-17 20:40:22] community_owned

I've got a little project going on that tries allow focus on writing content and designing nice HTML/CSS. All pages are flat text files, I like to think of it as website by config files:) http://pagegen.phnd.net


21
[0] [2011-03-29 23:02:02] Stephan Eggermont

Seaside in smalltalk. Because it doesn't use templates, but a fluent interface.


22
[0] [2010-12-19 18:29:06] Arturo Herrero

Another minimalist blog engine like Jekyll is toto [1]. toto is a git-powered blog engine. The articles are stored as .txt files, with embeded metadata (in yaml format) and are processed through a markdown converter.

[1] http://cloudhead.io/toto

23
[0] [2011-01-05 13:23:27] Skami 18

thedz said:

If it's a simple blog, a while back I wrote a quick Python utility that would generate static pages:

http://github.com/dz/chisel/tree/master

My primary goal was to make it easy to extend and edit, hence the relative few number of basic page types it generates.

Good work: The code is very easy to understand and this is the example I needed! Thanks !


24
[0] [2009-06-11 21:11:02] community_owned

maybe take a look at growl [1] ...

[1] http://github.com/xfire/growl/tree

dead link, please update - SamGoody
25
[0] [2009-11-08 20:01:21] Ben

Don't forget that there are lots of good full-scale CMSes out there that create static files. Movable Type [1] and WordPress [2] have great communities built up around them, with lots of plugins and support.

[1] http://www.movabletype.org/
[2] http://www.blogtrepreneur.com/2007/08/29/building-a-static-site-using-wordpress/

26