You may have noticed I am finally getting back to a habit of updating my blog again. I put off updating my blog for a long while because I was pretty busy as I mentioned a few weeks ago, but I also quite updating my blog because I didn't like using wordpress anymore and I hadn't gotten around to replacing it. It actually had a pretty nice interface, but it got to the point where I didn't like it as much because every time I logged into my blog's control panel, there was a new security update for it that I needed to install. Every time I logged in to write another blog entry, I would notice the message that I need to update it. I would have to download the patch, read through the instructions and install it on the server before doing what I really intended to do which was write another blog entry. My only other choice was to ignore the message that a new security update was available and then write my blog entry anyhow.
After letting my blog sit for awhile, I noticed that several of my friends were moving over to static blogs. Static blogs are blogs that are not dynamic web applications. They do not have code that is running on the server querying a database when a user goes to look at an entry. Instead they have a database or some sort of storage that runs on a desktop for maintaining the blog entries. A script is then run to read the blog entries on the desktop and generate a set of simple static pages that make up the blog. I'm sure there are variations on the design that I just described but ultimately the blog ends up as a set of static web pages.
This has two distinct advantages. For one my blog is lot faster. There is no server-side dynamic code running as you navigate through the site which significantly speeds it up. Second the security is simplified greatly. Again with no dynamic code you only have to worry about making sure the security of the web pages is correct. No more steady stream of patches from wordpress to worry about.
Another nice thing is you can make a static website feel extremely dynamic with java-script these days. Javascript is used far more heavily on the web today than when I first launched my website years ago. Libraries like jQuery can easily help you fill the void of switching away from a dynamic website. The pagination on my blog is nothing more then static web pages that our loaded dynamically with java-script making the site feel very dynamic.
There are a number of static blog generators out there that seemed fairly nice but I decided to create my own simple one. The only time I want to mess around with the blog software is when I am deciding on my own terms to implement a new feature that I want. I don't really have to worry to much about security holes since that is pretty much handled by the web server with a static blog. After I work out the kinks in my own software the only maintenance I need to worry about is when I want to implement my own changes. After constantly updating wordpress this sounded very nice to me.
I can think three basic parts to my new blog engine. The blog entry authoring tool, the method of storing or organizing the blog entries, and the script which generates the web site. For the authoring tool I decided to use Open Office or Libre Office for now. Really it is the Open Document Format that I decided to standardize on writing my blog entries in, but for now the best tool to author an open document file is Libre or Open Office. I picked the open document format primarily for two reasons. The first being that I have a choice of a number of nice word processors for authoring my blog entries in. The second being that the open document format is very nice at storing all sorts of metadata. This allows me to store most if not all of the metadata about the blog entry in the document for the entry itself.
The method I use to store and organize my blog entries is using openKM (the same tool I mentioned in my previous blog entry that I use for document management). If I were to write this tool as an open-source project (which I may do in the future) that others would use I would probably just organize the documents in a directory structure. Most of the metadata about the blog entry is stored in the open document format anyhow. Since I store my other documents in OpenKM though, I thought what the heck and designed my script to pull the documents out of the document management system. I do use the categorizing feature in OpenKM though to categorize my blog entries with projects. My script then parses this metadata out of OpenKM when it builds the project pages.
The last piece of my new blog engine is a fairly small groovy script which pulls the documents out of openKM, and parses through them. The Open Document Format is nothing more than a zip file which contains various xml files that make up the content and metadata as well as some image files if you did anything to include images. It wasn't to hard hard with groovy's xml parser to start parsing out blog entries out of the open document format. There are a few problems that I still have such as special characters (you may have noticed) and I am not currently handling much of the special formatting (Not that I really need to). As I need a new features I will just implement it. Anyhow once I decided to go the route that I did I was able to get the blog engine script into a usable state fairly quickly. 90 percent of the features I initially wanted are already implemented. The last 10 percent will probably turn out to be a pain in the butt though. That is usually how it is...