Getting Started With Pelican

by Scott Hebert

Pelican logo -rightI've been using WordPress on this site since 2007. After all this time, I've decided I want to try something new. So, I've decided to go in a completely different direction and start serving static content. There are three things driving my decision to change:

  • The existing site is really just a bunch of static content, but since it's driven by WordPress, that means every page view requires some level of interaction with a database. In the case of slaptijack.com, that's about 35 queries per view (and from experience, that's actually pretty darn low).
  • To make matters worse, WordPress just offers another vector for security breaches. With the static site, there's one less thing to worry about.
  • Finally, I've really begun to appreciate editing local Markdown files in my favorite editor rather than using a browser-based WYSIWYG editor.

So, I've decided to try using Pelican to generate a static site. I chose Pelican because I prefer Python and want to use it whenever possible. Jekyll is probably the best known static site generator, but it's Ruby.

There are currently over 1,300 posts on slaptijack.com. At the moment, it is not my intention to convert them all to Pelican. Instead, I'll likely run the two things in tandem for a while. Very few people follow the site like a normal blog, so I don't think it will cause any discontinuity if newer stuff is generated in Pelican only. Fortunately, WordPress does support serving local files if they exist, so everything should "just work."