jmhobbs@pyhacker ~/archive2012/migrating-to-pelican/

date

Thu Nov 15 16:31:09 PST 2012

whoami

jmhobbs

ls

comments content tags related

wc content

273

cat content

Inspired by a post here, I decided to checkout Pelican. This site has been powered by Django for a few years and although I love Django, it’s a bit overkill for this blog. I also thought it’d be a good idea to give my little SheevaPlug server a break from running a database backed website.

Migrating this site off of Django and onto Pelican was pretty easy (it helped that I only had a handful of articles to migrate!). Pelican comes with a migration tool but since my content was created using django-articles, I ended up writing my own migration tool. That tool can be found here:

articles_to_pelican

Migrating my Django templates to Pelican themes was pretty straight forward as well. Pelican themes use Jinja2 templates which are modeled after Django’s templates. Here’s the theme I created:

pelican-pyhacker

The thing that’s great about ditching Django for Pelican is now the entire site is static. To create a new article, I simply create a new Markdown file then run a Pelican command to regenerate the website. Now I can write articles in Vim instead of having to use a web browser!

Since the website is static, I can host it for free on Bitbucket. I have a post-commit hook installed in my blog repo that automagically pushes any new changes so the website is always up to date. I can also take advantage of caching services like CloudFlare to speed up the site since all my content is static.

Check out Bitbucket and their static web serving if this intrigues you. It certainly got me excited!

cat tags

pelican django python bitbucket

cat related

gitorious.py - A command line interface to Gitorious

cat comments

Comments powered by Disqus