New Weblog Software and Process: The Mike Shea Content Management System

by Mike Shea on 8 October 2005

As we already know, I have been quite obsessed with the idea of saving digital data in some sort of archival means. About two weeks ago I also came to the conclusion that my URLs, generated from Movable Type sucked. They weren't descriptive and when I tried to use title-based URLs instead of numeric identifiers, it forced them into date-based directories which I didn't like either.

So I decided to sit down and rewrite my weblog software from scratch. My weblog isn't overly complicated. I don't have a comment system since it just got flooded with spam anyway, and I don't use trackbacks or any such system.

I also liked the idea of just writing web pages as they were meant to be written - by hand. However, updating indexes and rss feeds and the like is sort of a pain in the ass to do by hand.

So I began to come up with some criteria:

So what did I come up with? The Mike Shea Content Management System. It's dirt simple and missing about 95% of the features one would expect. It doesn't have commenting. It has a very simple editor. The security right now is abysmal but I plan to add a single-user password. There isn't a clear way to edit files. It uses unix timestamps for the sorting order on the front page which isn't always accurate. If you modify an old file, it pops up top again but I wrote a parsing script that will re-date them based on the date inside the file itself.

A user can enter a bunch of text into a text form. This text is saved to a .txt file with the file name generated from the first line on the text file. The script then opens each .txt file and generates HTML files from them by replacing double line breaks with P tags and single line breaks with BRs. The HTML files are stored right alongside the text files. An index.html and index.xml file are both saved along with a full single-file text version of the whole site called "all.txt".

The entire contents of the directory can be zipped and moved to another file system. A simple perl script can save it to a database, split it apart, join it together, convert it to PDF, or whatever.

Along with the new CMS comes a new process for writing blog entries.

I now use Gmail as my text editor. The Gmail email composition window now auto-saves to the server. There is no need to ever click "save" and I can jump from machine to machine and still see exactly what I was writing at the time. It has the best built-in spell checker I have ever seen and since I only ever write text, I don't care about formatting or markup.

I type up my entry in Gmail, spell check it, link anything that needs to be linked with "a href" tags and then cut and paste it into my CMS form. When I save it, the site rebuilds and my blog entry pops to the top of the list. It is extremely simple and will hopefully work well.

I still have a bit of fixing to do to some of my older entries. There are still some b tags and things lost in the code somewhere.

I don't expect to dump Movable Type for all of my weblogs but for MikeShea.net it seems to work very well.

In other news, it appears that Google now has an RSS feed reader. It may have taken five years but RSS is finally really starting to pick up. God help us if Google ever becomes evil.