Feature list

Below is a list of features that webgen supports or will shortly support.

  • webgen core features

    The following list shows general benefits of using webgen:

    • Fast (only the necessary files are regenerated)
    • Easy to install and use
    • Runs on Linux, Mac OS X, Windows
    • Extendable by writing add-ons in Ruby
    • Easy to configure if one needs to (no need if you are happy with the default values)
    • Command line interface uses command style syntax (like Subversion’s svn command)
  • Supported content formats/markup languages

    webgen content files can be written in a number of different content formats and new content formats can be easily added. Currently webgen supports:

    • Markdown (including special syntax like setting header ids and html attributes through the kramdown library)
    • Textile
    • Haml and Sass
    • RDoc (the native API documentation format for Ruby)
    • Builder (tool for programatically creating XML documents)
    • Smiley-to-emoticon conversion
    • Plain text
  • Supported file types

    Anything can be put into webgen’s source directory sothat it gets copied to the output directory but some file types are handled specially:

    • Page files (primarily used to define the content of a web page but can really be used to create about any text-based file format)
    • Template files (used to define the general layout of a web page, these are chainable/nestable)
    • Gallery files (you create one such file and get a whole image gallery for free, including goodies like EXIF information extraction and automatic thumbnail creation)
    • Sipttra files (files using a simple text-based feature/request tracking format)
  • Dynamic content

    Although webgen is used to create a finally static website, it allows one to embed dynamic parts in page and template files to support features like dynamic menu generation, dynamic link generation and more. The following methods for adding dynamic content are supported:

    • webgen tags: these allow non-programmers to easily add dynamic content using a simple markup syntax. webgen ships with many tag plugins for
      • generating menus and breadcrumb trails
      • listing all translations of a page
      • syntax highlighting code fragments or entire files
      • and much more
    • ERB (embedded Ruby) for custom scripts embedded into content files for advanced users.
  • Other features

    Additionally to the above webgen provides other useful features like:

    • Meta information can be specified for every file (e.g. title, menu ordering information, …)
    • Support for specifying ‘virtual files and directories’ (can be used, for example, to include links to external pages in the menu)
    • Generated HTML files can be automatically checked if they are standard conform
    • Automatic rebuilding of website on file change

Comparison to other generators

Many static website generators are available on the net. Following is a short comparison of webgen to the following static website generators (mail me if I should include others):

Please note that the comparison below is against the mentioned versions and some things may have changed in newer versions of these static website generators!

nanoc

nanoc is also written in Ruby and aims to be a small CMS. It is possible to programatically generate content and template files and nanoc even has support for some version control systems. It is also possible to extend nanoc with custom code.

Similarities:

  • nanoc also provides a wide variety of markup/template languages.
  • similiar command driven CLI
  • partial site generation (although not as powerful as webgen’s one)
  • auto-building of websites
  • output path can be customized
  • relative URL generation (with filters)
  • website structure can be customized via so called routers

Disadvantages:

  • nothing comparable to webgen tags
  • only one data source can be used at a time
  • no website templates/styles

Advantages:

  • programatic generation of content/template files
  • blogging support

webby

Webby is also written in Ruby and is similar to nanoc. It uses rake tasks for everything, from building the website to adding new content files and it is easy to extend. From a source code point of view it does not look as advanced as webgen or nanoc.

Similarities:

  • partial site generation (although not as powerful as webgen’s one)
  • auto-building of websites
  • helpers for syntax highlighting

Disadvantages:

  • not as many markup/template languages
  • nothing comparable to webgen tags
  • fixed website directory structure
  • not generating relative URLs

Advantages:

  • can use a database as a source of content
  • helper methods for outputting LaTeX and graphivz images