A very meta blog post

Published:

After spending way too much time thinking about it, I decided to use a static website generator for this blog. This means, unlike a dynamic content management system such as Wordpress or Dotclear, nothing but simple files (HTML, CSS) are deployed onto the Web server. This heavily limits the interactions one could have with a website (no comments for instance), but it also greatly simplifies what needs to be running on the Web server to serve the pages.

I went with Pelican because it's an established project, it's well maintained, and it's written in a programming language I am comfortable with, so if needs be, I could tweak it or help fixing issues with it.

There are dozens of themes for Pelican blogs, but I decided to create my own. Why? Simply because I wanted something as light as possible. Also, I don't have a lot of opportunities to play with HTML and CSS these days, so this is a good time to do it and see what's new.

Like a lot of other systems (both static and dynamic), Pelican uses a template engine to render the HTML pages. The venerable SPIP calls these templates "skeletons", and I think it's a good description of what it is: a skeleton used to flesh out new pages out of it. Since Pelican is using a lot of specific variables and I didn't want to spend too much time in the source code nor the documentation, I decided to start from their simple theme which, as you can guess, is a very basic set of templates to generate a website.

Yet even such a simple theme could be simplified (at least for my needs). For instance, a lot of HTML tags had an id and/or a class attribute:

<body id="index" class="home">
<header id="banner" class="body">
(...)
<nav id="menu"><ul>
(...)
<footer id="contentinfo" class="body">
(...)

However, I don't think they are very useful, since most of these tags can be targeted with CSS without such an id/class attribute, so I removed them.

I ended up sending a pull request to make the simple theme even more simple. That's the beauty of open source: everyone can suggest and/or make changes!