magπ

A crafty, nommy, occassionally geeky blog-thing.

Always With the Fussing

Sometimes I think its more the process of designing a new site, rather than using the site itself, which I particularly like. I don’t mean the graphical layout, which while fun is never entirely satisfying. I mean the planning. Working out how everything should fit together, picking the best tool for maintaining it (be it blogging or CMS software, a hack of mHonarc and procmail filters, or something homegrown), and then tweaking and hacking the heck out of everything. Its the puzzle, growing as unweildly as my imagination can go, with no end or deadline in site.

Of course, I like the idea of a blog. I need to write more. Both in terms of re-honing skills lost in years of not, and in terms of actually standing a chance of remembering shtuff I do. I read books. I have opinions of them. And 2 days later I can barely remember what the book was about, nevermind why there’s this bad taste (or giddy feeling) when I try to recall it.

Or what new cheese I like.

And since at least some of this is shtuff I’d be happy to share with family and friends, if I ever remembered to, a blog makes some kind of sense.

There are a number of really nice blogging and CMS frameworks out there right now. Movable Type is one that I have frequently recommended for family, friends and clients. Its slick, generates static archives, handles multiple categories with panache, and is easy to template. My two main complaints about it are that (1) I haven’t been able to find a simple way of “hiding” specific entries. Some things I write are either personal, or drabble. Either way, its not all fit for anyone who comes along. I’d like to hide some entries behind a password, so that only family or friends can read them. Others, I’d like to keep for my eyes only.

(2) Ease of posting. I do all of my writing these days in vi. Wordprocessors and webforms, on the otherhand, are clunky and distracting. They may have their place, but if I want to do any relaxed, genuine writing, I need my vi editor. Having to write a post, then log in to a website, copy and paste and approve and submit is far too many steps. I did try playing with some email2mt scripts, wherein I could write the post in mutt (I use vi as my email editor =P), send it to myself with a custom header which would get flagged by procmail. Procmail would then pipe the body of the message to the script which would import it into MT. Sounds reasonable enough, but they never seemed to work quite right. Drupal is a spiffy CMS which I’m currently using for itadakimasu.clutchpig.net, my foodie site. The code is clean, it uses a surprisingly robust taxonomy framework for categorizing posts (think ‘keywords’), and even comes with custom modules for book reviews, posting images, etc. I considered using this for my blog as well, but again with the ease of posting –_–;;;

Then I remembered Blosxom. This is a sweet little program consisting of about 135 lines of perl code. It uses the filesystem as its database (and why not? The filesystem is already a sophisticated database, good for dealing with lots of files in a heirarchical arrangement), is easily and thoroughly skinnable (code generated is as cleas as the skin you write), and has all sorts of nifty plugins available. Including an image gallery. Each post is simply a text file on your filesystem, put in a subdirectory which represents your category of choice. How simple is that?

So now the tweaking begins. At the moment, I have 3 different sorts of ‘views’ or pages required. There’s the standard view, which concatenates the entirety of the selected posts in chronological order on one page. Each post on this age has a link to ‘itself’, which is to say, reloads the blog, with the same skin, but this time only selects that particular post. Each post should also have a link to is ‘category’ page, which would then filter the selection to include all posts in the given category. In cases where the category is actually a sub-category, there should be a link to each level in the tree.

Second, is the ‘screenshot’ page. The index view can be the same as the standard view. However, when actually viewing a full-sized image, I need a much plainer page—the image breaks out of the CSS layout, which is distracting and unaesthetic. I created a skin called .screenshot, which is a barebones HTML page—white background, no ornamentation, which contains the gallery name, and then image. Like so. I edited the code in the gallery source, so that image links have this particular skin hardcoded in. One of the nifty things about Blosxom—skins (or themes, as they are called in Blosxom-land) can be specified through the URL.

Finally, I need an ‘post index’ skin, to use for reviews. When somebody clicks on one of the consumption pages, rather than being presented with the full text of all of the available posts, I want them to see an index listing instead. It would be a list containing the post’s date, subcategory, and title. This way, I have a quick and easy to find list of all of the books that I have read, CDs I’ve listened to, restaurants I’ve visited, etc. I haven’t figured out the best way of doing this yet. One thought I had was to create a seperate theme for each category (symlink repeated themes). Through the use of the permalink plugin, the category name is an available variable which could be attached to the URLs generated by the categorylist plugin (which generates the category links on the left-hand side). I’m just not convinced that there isn’t a better way to do this.

Blsxom3.0 (which is not yet out), apparently enables one to hardcode a given theme to a post, which opens some interesting possibilities.

Next I need to install the login plugin, which will allow me to password protect posts on either a post or category basis. I can even specify which users can see which posts, which is pretty groovey, and will enable me to keep really sucky posts to myself ^.–;;

Finally, I’d like to find a way to generate date-based archives on a per category basis. The calendar plugin works globally, whereas I would like it to be aware of which category is being viewed, and only provide entries for the given date, month, or year in the current category. In most cases, this doesn’t matter to much. However, I’d like an easy way of pulling up “The Books of 2004”, without having to hardcode in the link.

More musings later I s’pose. Now… muffalleta calls to me =)~