Chronicle : The Blog Compiler
Chronicle is a simple blog compiler, written in Perl with minimal dependencies.
A blog compiler is something which will convert a collection of input files into a static tree of HTML and RSS files.
These can then be published online giving your viewers the ability to browse a themed blog containing:
- Archives of your prior posts.
- Tag-based archives of your prior posts.
- RSS Feeds.
Because the generated site is entirely static it can be served with minimal overhead, and won't cause your server load to rise if you receive thousands of visitors.
Despite being static you can still allow users to leave comments upon your posts; they will just remain "pending" until you next rebuild your blog.
Because the output of the software depends upon the entries you write yourself, and the theme you've chosen to use the look and feel of your site will vary.
However here are some sample examples of the output the compiler produces, when called with using these input files.
- Default theme
- Copyrighteous Theme
- Blocky Theme
- Simple Theme
For "real world" usage of this software please see my personal Debian & free software blog.
You may download the current stable release from the following links:
This software is part of the Debian GNU/Linux distribution and can be installed directly via the Debian repository.
If you'd like to try something more cutting edge please see the chronicle git repository.
To use the software you'll need the Date::Parse and HTML::Template perl modules. Debian GNU/Linux users may install these by running:
apt-get install libtimedate-perl libhtml-template-perl
Download, unpack, and run "make install". This will give you a configuration file in /etc, the binary in /usr/local/bin, and the themes beneath /usr/share/chronicle.
Now create ./blog and populate it with blog entries in the correct format. If you run "chronicle --verbose" you'll see your compiled files being produced.
A sample blog entry would be a text file with contents like this:
Title: This is the title for an entry
Tags: comma, separated, tag, names
Date: 14th August 2007
<p>This is the first line of the blog entry.</p>
<p>This is the last line of the blog entry.</p>
In this example the blog has been written in HTML, but you may choose to write your entries in textile or markdown formats if you prefer.
You may specify the global format by adding "--format=xx" to your chronicle command line, or by updating your chronicle configuration file:
format = [ html | markdown | textile ]
If you do not enter a title the filename of the entry will be used, minus suffix. Similarly if you do not enter a date then the last change time (ctime) of the file will be used as a default.
(You may also use Subject: instead of Title: if you prefer, that could be useful if you setup an alias to allow emails to become posts.)
NOTE: It is mandatory to separate the body and the header of the entry with at least one blank line. If you do not do this your entry will be ignored.