Next: , Previous: Blosxom, Up: Blosxom


9.1.1 Other tools needed for the Blosxom style

You will need to have pyblosxom.cgi or blosxom.cgi installed on a machine that you have upload access to.

The major difficulty in both of these programs is specifying the date of the entries. Both programs rely on the file modification time rather than any data contained in the entries themselves. A plugin is needed in order for these programs to be able to get the correct date.

PyBlosxom

There are two different ways of accomplishing this in pyblosxom. The first way involves gathering the timestamps (as specified by the #date directive) into one file and then sending that file along with published entries to the webserver.

The second will read each file at render time and parse the #postdate directive. Muse will translate the #date directive into #postdate at publish time, so you don't have to do any extra work.

Placing timestamps in one file

The following additional components are required in order to make the date of blog entries display as something sensible.

  1. A script to gather date directives from the entire blog tree into a single file. The file must associate a blog entry with a date.
  2. A plugin for (py)blosxom that reads this file.

These 2 things are provided for pyblosxom.cgi in the contrib/pyblosxom subdirectory. getstamps.py provides the former service, while hardcodedates.py provides the latter service.

Here is a sample listing from my timestamps file, which maps each file to a date. This can really be in any format, as long as your date-gathering script and your plugin can both understand it.

     2005-04-01-14-16 personal/paper_cranes
     2005-03-21 personal/spring_break_over
     2004-10-24 personal/finished_free_culture

The script contrib/pyblosxom/make-blog demonstrates how to call getstamps.py. Note that you will need to set the current directory to where your Muse files are, execute getstamps.py, and then move the generated timestamps file to your publishing directory.

Getting timestamp from entry while rendering

Alternately, the pyblosxom metadate plugin may be used. On the plus side, there is no need to run a script to gather the date. On the downside, each entry is read twice rather than once when the page is rendered. Set the value of muse-blosxom-use-metadate to non-nil to enable adding a #postdate directive to all published files. You can do this by:

     M-x customize-variable RET muse-blosxom-use-metadate RET

With the metadate plugin installed in pyblosxom, the date set in this directive will be used instead of the file's modification time. The plugin is included with Muse at contrib/pyblosxom/metadate.py.

Blosxom

It is also possible to use Blosxom, which is written in Perl, to serve blog entries that were published with Muse. The steps are as follows.

  1. Download and install blosxom from http://blosxom.sourceforge.net/.
  2. Install the metadate plugin. It is available in contrib/blosxom/metadate_0_0_3.
  3. Every time you make a new blog entry, change to the blosxom data directory and execute the contrib/blosxom/getstamps.pl script. This script has only recently been made, and may still have some bugs, so use with caution.