Fork me on GitHub

Switching to Pelican

The last two years have been spent ignoring this site so obviously it is time to redo it. A coworker told me about Pelican a while back and it seemed like it would fit my needs so I gave it a try. I turned out to be really easy and I managed to convert the site to use Pelican and publish to Heroku in about two hours.

First I installed Pelican into a virtualenv and ran the quickstart:

pip install pelican

The quickstart just asks a few simple questions about the site. When it was done I poked around in to see what knobs could be fiddled with. I fixed up the timezone, removed SITES and filled in the SOCIAL links. This is what it looks like today:

#!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals

AUTHOR = u'Tom Manley'
SITENAME = u'Tom Manley'

PATH = 'content'

TIMEZONE = 'America/Chicago'



ARTICLE_URL = 'posts/{date:%Y}/{date:%b}/{date:%d}/{slug}/'
ARTICLE_SAVE_AS = 'posts/{date:%Y}/{date:%b}/{date:%d}/{slug}/index.html'

# Feed generation is usually not desired when developing

# Social widget
SOCIAL = (('Twitter', ''),
          ('Github', ''),
          ('LinkedIn', ''),)


Since I setup Fabric during the quickstart process, testing the new site is easy:

fab reserve

This builds and serves up the site at The first thing that struck me is how nice it looks. Just another reminder that I'm not a frontend kind of guy.

Moving the content to Pelican was easy since it was already in Markdown. I just moved the static pages into content/pages/ and the single blog post (yeah, I don't write much) into content.

The last step was to publish the new site on Heroku. First I enabled the Heroku buildpack:

heroku config:set BUILDPACK_URL=

Then I removed the web: line from the Procfile so now it is empty. Finally I committed all the changes and pushed to Heroku like normal. And that was basically it!

Only thing left to do is start writing more, and maybe replace the default theme.

Comments !