Skip to content

Simple website creation tools

I host a number of websites which are mostly static in nature, these are often hand-crafted, but three of them us a slightly hacked up creation of my own.

Given a master "template" the file foo.skx gets massaged into foo.html.

Sadly I added features randomly, and now I have three template-driven sites which are handled slightly differently. This put me in the position of having to choose between two options:

  • Unify my template-handling.
  • Use something else.

Simplifying my life is good. So I examined a list of static site generators, and a few more found by searching github.

Other than doing clever things by knowing which page is "current" I needed to do only minimal magic:

  • Conditionally include files.
  • Setup per-page CSS files.
    • e.g. This page and this page differ by the stylesheet used. (And the text content too, clearly!)
  • Setup per-page templates.

Webgen looked like a good fit, but I couldn't get per-page templates to work out. Either they would work, or I would get weird errors about blocks not being known.

Webby worked, but I didn't like it.

Poole was the next one that I got far down the road with, but it allowed only a single site-wide template. Shame because otherwise I loved its flexibility enought to tolerate writing "macros" in Python.

I've still got to test more out, but it is a fun process. I fully intend to adopt an existing tool, and not keep working on my own.

Tonight I'm going to look at a few more.

Comments On This Entry

  1. [gravitar] pachi

    I'm using tahchee and has been working fine for me for years. And these days I would also give hyde a try too. Both are projects coded in python.

  2. [gravitar] jd

    I use Hyde and I like it.

  3. [gravitar] eikenberry

    Keep posting updates please... I've been meaning to replace my hacked up generator with an existing tool as well. So this is very useful. Thanks.

    Oh, maybe list the ones you found that aren't on the linked to list. Maybe even report them back to Timo as he asked for people to report new ones so he could update his list.


  4. [gravitar] cstamas

    And what do you think about ikiwiki?

  5. [author] Steve

    I'll update once I've looked at more, and made a choice.

    ikiwiki I've not considered because I'm looking to generate a site, rather than a blog. Yes it can be used for sites, I'm sure. But I discounted anything that was blog-centric, or wiki-centric.

    As per my requirements I want conditional file inclusion, per-page templates, and pretty much nothing else. If I get per-page template variables, etc, that's a nice bonus.

    For example I use this in one of my sites:

    Title: The system administration & Automation Tool
    #Menu: menu.inc
    
    ..
    

    That files the DIV with id="menu" with the contents of the named file, relative to the path of the input file, if it exists.

    Something a lot of tools seem to fail on. So many, includng poole, just allow you to replace "page.title", and "page.contents" - there's no notion of replacing arbitrary blocks in the output page unless you use partials or nested templates. Annoying. Ugly. Shame.

  6. [gravitar] Leandro Penz

    I use two setups:
    - django and then rip with with wget;
    - mako.

  7. [gravitar] rjc

    What about good old WML?

  8. [gravitar] Charles Stewart

    Isn't your chronicle blog compiler 2/3rds of what you need? Chronicle/rfc822 -style headers seem like they are enough to pass the desired per-page information to HTML::Template.

  9. [author] Steve Kemp

    I discounted chronicle for the same reason that I discounted ikiwiki above - but yes, both could probably do the job, though ikiwiki would require less hacking.

    Hrn - and after spending last night looking at more tools I realize I have a third requirement:

    • In-place processing.

    So many tools take "input/" and write to "output/". I guess that can work if I symlink the two togther. Me? I have .skx/.wgn files in my htdocs directory - simply to avoid having to copy around static files/assets which aren't processed.


  10. [gravitar] gabriel

    I manage a french website for a folk association by ikiwiki. It's very pleasant to use and some part may look libre blog but not all !

    http://www.folkatp.fr/

  11. [gravitar] Thomas Leitner

    webgen meets all your requirements. Furthermore, it also supports multiple content blocks per content file.

    Per page templates: just specify a 'template' meta information for the page and make sure that you set the 'template' meta information of template itself to null so that the template does not get nested inside the default template.

    As for block being unknown: You may need to look at the additional attributes for the tag.

  12. [gravitar] Martin

    A relatively new, very promising tool is "nikola". The feature list is impressing:

    * Creates pure static web pages
    * Blog generator, including tags, feeds, archives, comments, etc.
    * Theme support
    * Fast building process, thanks to doit
    * Easy Image Gallery, just drop files in a folder!
    * reStructuredText or Markdown as Input languages
    * Flexible design
    * Small codebase.
    * Syntax highlighting for almost any programming language or markup
    * Multi-language sites
    * Small, since based on leverages existing tools

    It uses Twitters bootstrap, and is written in Python:

    http://packages.qa.debian.org/n/nikola.html

    I did not yet find time to try it out, unfortunately.