Blog Features I Want

22:44 Sun 11 Mar 2012
[, , , , , , , , , , , ]

A discussion of common and custom blog features, and candidate applications that might provide them.

At time of writing, this blog runs on WordPress. After issues arising from my recent downtime I’m considering moving to something else, and outline below the implications of switching or staying put.

The broad characteristics I’m looking for are:

  • Customizability: I need to be able to adapt it, in terms of both aesthetics and functionality.
  • Durability: The blog shouldn’t break easily, should be easy to maintain, transport, and back up, and be reasonably secure. The technology driving it should be one that I understand well.
  • Simplicity: The blog software itself should be easy to understand, and preferably consist of a small number of parts.
  • Scalability: The blog software should be able to handle any sudden rise in popularity without much trouble.
  • Scriptability: I should be able to interact with it via command-line tools, ideally in a well-documented fashion.

I’ve customized my current setup extensively, and have created scripts for a lot of functionality I rely on. However, WordPress has some major disadvantages:

  • Fragility: It’s relatively easy for things to go wrong. It’s a complex piece of software with lots of parts, and not tremendously robust. In addition, because of its reliance on a database, it’s possible to lose state unless explicit backups are scheduled.
  • Performance: It can be rather slow, and can suffer under load. While I don’t have a huge amount of traffic, I would like any outages to be due to my running out of bandwidth rather than anything else, and in its current home I’ve already seen it fail due to database load.
  • Security: WordPress is fairly notorious for having security holes, and while that can be obviated to a certain extent by running it in a chroot, it’s still a problem. In fairness, any blog platform with comments and live editing will have similar security problems.

WordPress is also written in PHP, and that’s not a language I want to write in. I’ve written some plugins, but no longer have much enthusiasm for maintaining or improving them, and would far prefer to make any improvements to my blog in Python.

I would like to move to a static-site system—similar to taking every possible page from my current blog, saving it as HTML, and then presenting the resulting HTML as the blog, having thus removed all of the server-side dynamic elements. This eliminates a number of problems, performance first among them, as the server doesn’t have to do anything other than return HTML pages from disk.

Of course, much of the point of blog software is to make it easy to write posts without having to put HTML files in specific places and deal with other overhead. There’s a trend in blogging applications to attempt to get the best of both worlds by having the software do the traditional blog tasks but then publish an entire static site. WP Super Cache effectively does this with WordPress, but purely for performance purposes, without addressing the other issues.

Since I have a strong preference for Python, I’ve been looking at Python static site generators, and specifically blogofile, which appears to support a lot of the common features:

  • Categories (although I’m not sure I use this that much).
  • Chronological post listings.
  • Clean URLs.
  • Code syntax highlighting.
  • Post summaries/excerpts.
  • RSS feeds.
  • Tags (although not to the extent I want).

blogofile also supports comments, by offloading that functionality to third-party comment service Disqus, something I’m hesitant to do (because I like to run all my own services) but may have to accept.

Some common features it doesn’t support:

  • Chronological post lists for month, year, and day—if you visit http://tadhg.com/wp/2011/01 you get a list of all posts from January 2011, but blogofile doesn’t do that for some reason; that should be easy to add to the build step.
  • Full-text search. My best bet there would be to offload it to Google Custom Search, at least at first, and look at running either a Python or JavaScript service for it later.
  • In-browser editor and administration. I don’t need these, but they matter to some people.
  • RSS feeds for comments. Disqus might support this, however.
  • Searching by tag combinations. WordPress has limited support for this, but not blogofile. It might be possible to write support for it in JavaScript, as the tag/post combinations should be small enough to allow the user’s browser to do the work.

Finally, the features that aren’t popular but which I want for my blog:

  • Change-only site generation. Irrelevant for WordPress because it doesn’t generate the site, I want this for blogofile because I have over 1500 posts and don’t want to rebuild everything whenever I add a new one.
  • Command-line posting. I use pyblog to hook Vim up to WordPress’s XML-RPC functionality, and any blog has to support a similar interface. blogofile operates entirely from the command line.
  • Comments visible to search engines. Disqus loads comments onto pages using JavaScript, which search engines don’t see, so to rectify that with blogofile I’d have to write custom code to pull comments out of Disqus and insert them at time of publication, while still pulling later comments from Disqus.
  • Dynamic header graphics. This is a little silly, but the header on my current blog randomly serves an image from a set based on the post category. Adding a Python or JavaScript service to do the same with a static site should be simple enough.
  • Export. WordPress supports this, but I don’t think blogofile does, perhaps because it’s counterintuitive for a flat-files system to do so. However, I want to be able to move back to WordPress in future if I need to, and so might have to write a way to generate a WordPress backup file from blogofile.
  • Pages, i.e. blog content that isn’t really part of the blog; WordPress supports this, and it’s very easy to do in blogofile.
  • Random posts. I like the ability to provide random posts to users—this feature is currently broken on my blog, a sign of WordPress’ fragility. To do it in blogofile would probably require JavaScript, but doesn’t seem too hard.
  • Series support. My blog doesn’t have this, but I want it: UI indications that certain posts are part of a series, and easy navigation within that series. Adding that to blogofile seems straightforward.
  • Showing related posts by tags. I wrote a plugin that determines which other posts match the most tags for the current post. This is the best way to determine topic similarity that I’ve encountered. blogofile doesn’t support this or anything like it, and it would take some work to add this to the build process.
  • URL shortening. I like clean and descriptive URLs, but I would also like to be able to supply my own shortened ones in some cases. There are WordPress services for this, and I suspect it would be quite easy to add a Python service that sat next to blogofile to do this.
  • Version control support. I have good version control integration for WordPress in the sense that the source files for recent and some older posts are in a git repository. blogofile has good git support, but tweaks are required to make it do exactly what I want.
  • reStructuredText support. I write all my posts in it, and have put a lot of work into a pipeline that lets me go from reStructuredText in Vim to a published post in WordPress. blogofile supports reStructuredText, which is one of the reasons I’m considering it.

Bringing what I want to blogofile is a non-trivial amount of work, as is getting my current blog and source files into the required state for migration. WordPress will only add complexity in future, primarily features I don’t need, so moving is a good long-terms plan. For the moment, though, I’ll have to stick to WordPress.

2 Responses to “Blog Features I Want”

  1. Niall Says:

    Found this alternative to Blogofile. Haven’t used it though. http://pelican.readthedocs.org/en/2.8/index.html

  2. Jan Vlčinský Says:

    Hi Tadhg.
    I like your approach to searching for new solution – starting with definition of requirements. Nice.

    When searching for solution like this, I found also Pelican system and made quick review. The most informative to me was gallery of Pelican powered sites/blogs: https://github.com/getpelican/pelican/wiki/Powered-by-Pelican

    No real implementation yet, just pointing to something what looks quite promissing (but I am sure, it does not fulfill couple of your well stated requirements, while fulfilling others).

Leave a Reply