Back to templates

Template details

webgen

webgen is a free, GPL-licensed static website generator written in Ruby that builds HTML from markup and template files.

About this template

webgen is a free, GPL-licensed static website generator written in Ruby that transforms markup content and template files into a self-contained HTML site.

What is webgen?

webgen is a command line application created by Thomas Leitner that generates static websites by combining content files with template files to produce HTML pages. It takes source files written in Markdown, Textile, RDoc, Haml, or Sass as input and outputs a folder of HTML files that can be viewed without a web server. The project is distributed under GPLv3 and its GitHub repository currently has 117 stars.

Key Features

  • Multiple markup languages — Write content in Markdown, Textile, RDoc, Haml, or Sass and webgen converts it to HTML or CSS.
  • Automatic navigation — Menus, breadcrumb trails, and other dynamic elements are generated on the fly, so you don't write them by hand.
  • Partial regeneration — Only modified items are re-generated, which greatly speeds up builds on larger sites.
  • Self-contained output — All generated links are relative, so the site runs from a local folder without a web server.
  • Extensible architecture — Every major component can be extended or replaced with custom functionality.
  • No Ruby required for basics — Basic websites can be authored without writing any Ruby code.

Who is it for?

  • Site builders — People who want to separate content from layout and reuse templates across many pages.
  • Markdown writers — Bloggers, note-takers, and documentation authors who prefer writing in markup languages.
  • Designers — Those who want to use Haml and Sass for more expressive templating and styling.

What can you do with webgen?

  • Make a blog — Write posts in Markdown and webgen generates page menus and a navigable site structure.
  • Build documentation — Produce a docs site with breadcrumb trails and consistent navigation from RDoc or Markdown files.
  • Create a static portfolio — Use Haml templates and Sass stylesheets to build a self-contained, relative-linked site you can open directly from a disk.

How does webgen work?

First install Ruby and run gem install webgen. Then create a directory with content files and template files, and run the webgen command to generate the HTML site. It processes only changed files on subsequent runs.

Pricing

webgen is free and open source under the GNU General Public License version 3 (GPLv3).

Alternatives

  • Jekyll, which is also Ruby-based and integrates directly with GitHub Pages.
  • Hugo, which is written in Go and is known for very fast builds on large sites.

FAQ

Does webgen require Ruby?

Yes. webgen is written in Ruby, so you need the Ruby interpreter installed. The recommended installation path is gem install webgen, and Ruby can be downloaded from ruby-lang.org.

How do I install webgen?

Use RubyGems with gem install webgen, or download a tarball or zip file and run the setup.rb commands (config, setup, install). Both methods are described on the official installation page.

What markup languages does webgen support?

webgen supports Markdown, Textile, RDoc, Haml, and Sass. This lets you author content and styling in the markup language that fits your workflow.

Is webgen free?

Yes. webgen is free software licensed under GPLv3, so you can use, modify, and redistribute it under the same license. Sponsorship comes from GROSSWEBER, which provides development consulting and training services.

screenshot of webgen on template0.com