From Wordpress to Pelican

Back in September I decided to begin sharing some of my thoughts on science, software, and education by blogging regularly on my exploits. I’d previously built a website on top of Wordpress for Sundial, so I decided to go with that CMS. I purchased a domain name through GoDaddy, and out of convenience purchased Wordpress hosting through them as well.

Wordpress is a fine CMS, but I despised writing in the built-in editor. I’m a vim nerd, and really wanted to write in plaintext in my editor of choice. Also, I wanted to start sharing code snippets and iPython notebooks, and Wordpress was appearing an awkward choice at best for this.

Enter pelican, a static site generator written in Python that uses ReStructuredText as the markup of choice for articles. It took a little time to set up, but most of this was spent trying to approximate my old blog’s look by way of a custom theme.

If you’re interested in blogging with a statically-generated site through pelican, start by installing the python module locally with pip:

pip install --user pelican

Then build a skeleton that includes everything you need to get started with:

pelican-quickstart

The pelican docs have up-to-date information on how to proceed.

Since pelican generates static html files, they can be cheaply hosted. In fact, GitHub provides free page hosting via GitHub Pages. I created a repository for my site and edited the Makefile included in my pelican project directory to point to it. This allows me to regenerate and publish my static site with:

make github

It doesn’t get much easier. I’m very pleased.

EDIT: I have added my blog source to GitHub. Perhaps if you’re having trouble getting something working it will be of help.

related links

social