Setting Up Pyblosxom with Static Rendering - Part 1

I've decided to host my own blog instead of using a 3rd party blogging platform like Posterous, Wordpress, etc. Since I'm pretty much done, I'm now writing this blog entry so that you may learn how to do it on your own server.

My requirements for this new blog were:

  • it should be simple
  • statically rendered
  • readers are able to add comments
  • content is stored in an SCM
  • deployment and updating should be as painless as possible

First, the blog should be simple. I want to be able to move to another host with as little setup or configuration required. I've chosen Pyblosxom as my blogging platform because I've had some experience with it before. Blog entries are simple text files that you save on the server and are rendered as HTML, RSS, or Atom.

To install Pyblosxom, you will need to have Python 2 installed on your system. You may find an installer for your system by going to http://www.python.org/download/.

Once you have Python installed, I recommend that you use virtualenv to manage the Pyblosxom environment. You can simply follow http://www.virtualenv.org/en/latest/index.html#installation to install virtualenv.

After getting virtualenv, you must create a new environment and activate that environment and finally install Pyblosxom. You may try this if you are on a Linux or Mac machine:

$ python virtualenv.py pyblosxom-env
$ . pyblosxom-env/bin/activate
$ pip install pyblosxom

After installation, you should have a pyblosxom-cmd command that you can use to create a directory for your blog's files:

$ pyblosxom-cmd create mynewblog

After creating the directory, you can proceed to follow the Pyblosxom instructions to render your blog statically - http://pyblosxom.bluesock.org/1.5/deploy_staticrendering.html. The configuration file for your new blog is located in mynewblog/config.py.

You can now write entries for your blog by putting files into the mynewblog/entries/ directory.

To render the HTML files for your blog, you will simply need to run a command after adding a new file or blog post:

$ pyblosxsom-cmd staticrender

Assuming you configured Pyblosxom correctly, specifically the py["static_dir"] setting, you will see the generated files placed in the directory that you specified.

In part two, we'll go over further customizations to your Pyblosxom installation.

blogroll

social