Lisp Blosxom Documentation


The first cut of Lisp Blosxom is a naïve, mostly verbatim, translation from Perl Blosxom. The second cut attempts to use CLOS to encapsulate state and such.


Perl Blosxom supports being called as a script; Lisp Blosxom will not support such a mode out of the box. Instead the idea is that the blog instance will be initialised once and then respond to requests over time. This was done primarily because the start-up time for registering CL-EMB templates is so great (it builds functions and compiles them on-the-fly, which is very slow in SBCL).


The BLOG class encapsulates an individual blog (thus Lisp Blosxom supports multiple concurrent blogs). Create a blog like this:

(make-instance 'blog
               :title "Blog Title"
	       :description "Short description of the blog in question"
	       :language "en-GB"
	       :data-dir #p"/usr/share/lisp-blosxom/blog"
	       :num-entries 24 ; number of entries to show per index page
	       :default-flavour "html")


Flavours specify different presentation of the same data; examples include HTML, RSS and so forth. Flavours are found in files ending in the flavour name, e.g. "html" for HTML files (although you are quite free to call the HTML flavour "foo-bar" if it makes you happy…). Before you can generate any blog pages, you can register the flavour templates for the flavour:

(register-templates BLOG-INSTANCE "/" "html")

This is no longer necessary in the latest CVS, since templates will be registered when they are first needed. There's currently no support for re-loading templates when they change on disk. REGISTER-TEMPLATES should do that.


To generate a blog page, simply call GENERATE with the desired path & flavour:

(generate BLOG-INSTANCE "/" "html")

This returns a string which is the complete text of the blog page.