The confguration of static rendering is held, along with all the rest
of Blosxom's configuration options, in the script itself. The default looks
something like this:
# --- Static Rendering -----
# Where are this blog's static files to be created?
$static_dir = "/Library/WebServer/Documents/blog";
# What's my administrative password
# (you must set this for static rendering)?
$static_password = "";
# What flavours should I generate statically?
@static_flavours = qw/html rss/;
# Should I statically generate individual entries?
# 0 = no, 1 = yes
$static_entries = 0;
# --------------------------------
Each configuration directive consists of a setting name (e.g. $static_dir
, an =
sign, and the setting's value (e.g. "/Library/WebServer/Documents/blog"
). In the case of words, the value is kept between double-quotes ("
); in the case of numbers, the quotes are absent. To change a setting's value, simply replace the current value with your preferred value. Be sure to leave the double-quotes intact if they're there.
For example, if you were to change the location of your blog's statically rendered files from the default, /Library/WebServer/Documents/blog
, to /home/username/www/blog
, that setting line would end up looking like: $static_dir = "/home/username/www/blog";
All clear? Good. Let's move on to the settings themselves.
$static_dir
: Where to put statically rendered files. This should be the full-path to somewhere in your Web-accessible document directory.
- ISP
You'll need to ask your service provider for the full-path to your public Web directory and point $static_dir
somewhere underneath that. For instance, if your home public Web directory were /home/sam/www
, your static configuration would read:
# Where are this blog's static files to be created?
$static_dir = "/home/sam/www/blog";
- Mac OS X
If you installed Blosxom under Mac OS X using either the Blosxom for Mac OS X installer or following the install by hand instructions, this'll be:
# Where are this blog's static files to be created?
$static_dir = "/Library/WebServer/Documents/blog";
- Windows 2000/XP
If you installed Blosxom under Windows 2000/XP and are running IIS, use somewhere under your c:\Inetpub
directory. While the Windows filesystem uses backslashes to separate elements of a path, Perl uses forward-slashes, like so:
# Where are this blog's static files to be created?
$static_dir = "c:/Inetpub/blog";
$static_password
: The password you need to feed Blosxom in order for it to kick into static rendering mode. This is added protection against anyone statically rendering your blog from the outside world via a browser -- Blosxom already checks whether or not it's being run in a CGI or command-line environment, but better safe than sorry. Static rendering won't work with a blank password, so be sure and set one
@static_flavours
: The list of flavours you wish to render statically. The defaults are HTML and RSS. If you have other flavours you've been using (and have the appropriate head.flavour, story.flavour, foot.flavour, and content_type.flavour files in your $datadir), simply add them to the list (separated by spaces).
$static_entries
: Should Blosxom generate individual files for individual entries in addition to the path-based, yearly, monthly, and daily views when statically rendering? The default is no (0
) since this has the potential to generate an awful lot of files if you're a prolific blogger.