Blog

This website is now officially a blog.

I used to be against blogs. Everything about them just annoyed me: the word blog, the trendiness of blogging, the vanity of bloggers, the fleeting relevance of blog posts.

But I changed my mind. Partly because I see so many high-quality blog posts, full of relevant technical information. Apparently I was wrong and the rest of the world was right: Blogs are very suitable for publishing informal technical notes and have in fact become the standard format for sharing such information.

The explicit organization of content by date, which I initially disliked, is actually a huge advantage. Having a date on each post makes it easy to explore a topic now, and to let it go when I lose interest. There is no commitment to keep working on old projects; no need to feel guilty for not keeping information up to date. People see the date and understand that older posts may become less relevant over time.

I still don't like the word though, blog.

Pelican

While turning this website into a blog, I also started to use Pelican to build the site. I had prevously used my own set of Python scripts to generate HTML, expand macros, insert menus, etc. Maintaining that old system required in-depth knowledge of HTML and CSS. I was hoping that Pelican would take care of those low-level details and allow me to work purely on content.

Setting up Pelican turned out to be more difficult than I had hoped. It is possible in principle to use Pelican with an out-of-the-box theme, just writing content and leaving low-level stuff to the software. But that approach breaks down when you want to modify the theme itself. As soon as you start editing the theme, you immediately find yourself knee-deep again in HTML and CSS. On top of that, you need to learn Jinja2, the template system used in Pelican. And if you want to build custom Pelican plugins, you need to figure out the (scarcely documented) Python data structures that Pelican uses internally.

In the end, I started with the built-in Pelican theme Blueidea and rewrote most of the templates and CSS to suit my preferences. I also implemented a bunch of custom plugins to handle citations, to evaluate in-line Python code in articles, and to provide macros for often-used HTML patterns.

What I ended up with is a mix of Pelican configuration, plugins, HTML templates and CSS. I'm not sure that this is either cleaner or more flexible than my old custom system. Pelican does in fact take care of a bunch of nasty details, but getting Pelican to do those things right was about as difficult as it would have been to do it myself in plain Python.

To be fair to Pelican, this mess is a result of a series of choices that I made myself. The whole thing could have been perfectly simple and clean if only I had picked an existing theme and not messed around with it. However, none of the existing themes work the way I want. Perhaps I have unreasonable demands about the way a simple blog should work. In any case, the whole thing seems to work nicely now so I'm going to stick with it for a while.

Comments

My blog does not have a commenting system yet.

I'd like to have comments. But I want them hosted on my server, I want the non-comment parts of my site to remain static, I want reasonable protection from spam and I want to moderate the comments against overtly inappropriate material. I have not yet found a system that handles all of this nicely. Maybe in the future.