Trying out Pelican static site generator.

Tue 10 June 2014 by Fred Clift


I'm running a couple of websites with pelican static website generator because it's easy to maintain, and lightweight, and kind of futurer-proof.


So I've tried a bunch of tools over the years to make personal web pages. I hand-rolled html (for a class) in the 90s, I used a variety of templates that were table based, and then later CSS based, and then a bunch of different blog and micro-blog software. Lighter weight ones like Blosxom and Serendipity, and several heavy-weight contenders like MovableType and Wordpress.

I have worked in hosting related fields off and on for 15 years and because of the nature of the business, my perspectives are a bit skewed. Density, multi-tennancy, and automatic upgrades are important, Working at NTT/Verio also kept me focused on localization. All that is important when you run software for other people on a large scale. But, I don't do that any more. Setting software up for myself makes me want to find lightweight and very easy to maintain systems. Blosxom is great in that it is mostly run from the cli - mostly flat files. It also has a lot of cool plugins. I used Serendipity with the sqlite backend, which again removed one service dependency and upgrade-pain-point.

My problem

I also recently got the opportunity to migrate an old old phpNuke based website (with phpBB forums) which were installed around 2002 and barely upgraded since. We had been limping along with all the admin functionality disabled because of the many many security vulnerabilities. We had upgraded from php3 to php4 on FreeBSD 8 with modest tweaks. The 5 year old hardware started to fail, and my 'free' colo with a friend was straining relationships.

My Solution

So, I set up a kvm instance at BetterServers which is a sister company to my employer BetterLinux, installed FreeBSD 10, and started to migrate the Website, the game, and shell accounts. PHP4 could be made to work, theoretically, but I didn't really want to have to build by hand (no longer supported by the ports system - the last release was 6ish years ago). Then I started trying to migrate the apps, mostly unchanged to work with PHP5. Ugh. Somwhere in there I decided that it would be better to throw out the old app, make an easier to maintain website and migrate a most of the content. I looked at several different dynamic and static simple cms systems that I could use. I knew I needed forum software and so I tried a few of those hoping that they might have themes or plugin systems that would allow a simple static site along with the forum. I tried some CMS systems like GetSimple that I could embed some forum software into... Eventually... I stumbled across Pelican which generates a website from a template and a variety of different markup-formatted files. (I mostly use markdown, but several others are supported) Pelican is in python, (works in 2.x and 3.x) and is aimed at someone who wants to, and is not afraid of tinkering.

So I set up a new website blackmud and embedded SimpleMachines forum into it and then migrated a lot of content in various forms from the old site.

Verdict? I like pelican. The templates are mostly aimed at people who want to write a blog. I was brushing up on my html, php, and markdown and did not want to have to learn Jinja2 templates also, though they look pretty simple.

I'd love a multi-level static website menu template. I kind of faked it with a heavily modified 'syte' template. I found a way to embed some legacy php utilities into the static page system (inline raw 'html' file includes in a reStructuredText doc) so that I get my old php utilties but get to keep the static menu and css around it. I'll write up the details sometime. The benefit of this is that I end up with mostly static html that should be very portable and not take much babysitting for years. Yes, I'll have to stay on top of SimpleMachines updates... I swear I'll be vigilant, no really I will! I hope.

I liked pelican enough that I thought I would replace my 5 year old one page site, and broken dead blog site with pelican generated stuff. This is the result