For some time now, I have been looking for another way to generate my web site. I have been using Drupal for more than four years. As a web technology, it worked fine, but it was always a hassle upgrading the PHP and the supporting database. For the most part, the upgrades went fine, but it was something that I dreaded because it took some time to complete. Further, as versions of Drupal moved on, it was sometimes difficult to make the transition since I was using a number of plugins. This was especially problematic when upgrading between major versions of Drupal.

With all of that said, Drupal did have a significant community, provided a lot of features (web galleries, authentication, in-browser content editing, etc.) and was very useful, but I didn't really have the desire to keep up with all of the upgrades, especially, from a security point of view. Said another way, Drupal was probably overly complicated for my particular application.

I have been looking for a while for a better solution. I looked at other content management systems (CMSes) like WordPress and Ghost. WordPress was tempting because of the ability to automatically track and apply updates. Ghost, based on Node.js, has a nice interface and was OK to install, but it was specifically a blogging tool and still has some of the upgrade challenges, though, maybe not to the same degree.

In the last few months, I ran across the latest incarnations of static site generators. Tools such as Jekyll, Nikola, Pelican, and many others (see StaticGen for one list of the huge number of options).

For now, I am using Pelican since it is written in Python (so it is something I can hack), it was fairly easy to get started with (see this Fedora Magazine article), and it is actively developed.

My first web site with Pelican was a web site I maintain for my sister-in-law. It worked out reasonably well and was a good place to start. The web site has several static pages and a photo gallery, so something fairly simple. Like this blog, I am using the pelican-bootstrap3 theme so the web site works reasonably well with both mobile and desktop devices.

For this web site, I am using a Sandstone Bootstrap theme, which looks nice. Cosmo is a free Bootstrap theme from Bootswatch. I tried Sandstone, but the menus were a bit hard to read on mobile devices.

As for Pelican plugins, I am using pin_to_top, i18n_subsites (needed by pelican-bootstrap3), photos, and tag_cloud. I had to hack the templates for pelican-bootstrap3 a little to support the photos plugin (instructions are provided on the GitHub repository linked above).

I am still learning how to style and use Pelican to its fullest extent, but so far it has been worth the investment of time to understand. Here are several things I like about using Pelican and static site generation more generally:

  • I like the fact that SSH and rsync can be used with the Makefile to push the code to the server.
  • Pelican's Makefile comes with a devserver target for for quickly prototyping the web site using a local Python web server.
  • The site itself is nicely portable since it is mainly a few Python files, a Makefile, a collection of Markdown files, and supporting files like images. This is much nicer than having everything stuck in a database.
  • Markdown has been a nice alternative to straight HTML, reducing the coding burden significantly.
  • Additionally, this simple approach for representing the site makes the site more easily managed with source configuration management tools like git and Subversion.
  • I also have noticed that the site serves very quickly--it is quite simple for the web server to serve static pages. In particular, the photo galleries come up very fast

Anyway, I think the transition will provide me some peace of mind. Enjoy!