AsciiDoc Website Builder

0.3.5 GPL (GNU General Public License)    
3.7/5 15
A Python program that allows you to write a website in almost plain text





AsciiDoc Website Builder is a program written in Python that allows you to write a website in almost plain text (ie AsciiDoc), plus a few simple configuration files. It exists to solve my problem of never updating my own website (which used a lot of PHP) because I couldn't quickly remember offhand all the changes and specific formatting I needed to add new pages.

Here are some key features of "AsciiDoc Website Builder":

· Flexible template system
· Blog generation
· Image gallery generation
· sitemap.xml generation
· All the yummy features of AsciiDoc

Getting started:

To start using awb you need to set up at least one website in your user awb configuration file. This is located at ~/.awb/awb.conf It could look something like this:

siteroot: /home/me/mywebsite
asciidoc options: -d book -b html4

This simply defines a website known to awb as "mywebsite". The options are:

The root directory of the awb website. The AsciiDoc source lives in +siteroot/src+, and the html output goes to +siteroot/html+.

The url of the root of the website. This is used for generating sitemap.xml.

asciidoc options::
Options to be passed to AsciiDoc. I use this to specify a custom html4.conf file in addition to the options shown in the example.

Once you have a website configured and some source files written, simply issue the command

% awb mywebsite

awb will only regenerate HTML files that have become out of date. If this doesn't work for some reason, the option -r can be used to fix it.

% awb -r mywebsite

This can be done from anywhere in the filesystem. awb knows from its configuration file where to read from and write to.


Each directory in the source tree may contain a configuration file named awbdir.conf. This file specifies directory-specific options to be used by awb.

[dir setup] section

can be one of 'normal', 'blog', or 'gallery'. 'normal' is the default. The meaning of the types is explained below.

A descriptive name of the directory, as shown in the breadcrumb trail.

awbdir.conf [blog] section

This section defines settings used if the directory type is blog.

num main posts::
The number of posts to show on the index.html page of the blog.

num recent posts::
The number of post titles to show in the "recent posts" list, and also the number of magazine titles to show in the "recent magazines" list.

[user] section

Here you can define any option you like. It can be referred to in the template. This is useful when you want to use the same template across the site, but change small parts of it (eg. an image).

awbdir.conf options cascade from a directory to its children. This is quite convenient, as child directories need only override the parent options that do not apply. The only exception is the directory name, which does not cascade.
Last updated on April 4th, 2012

0 User reviews so far.