Why I decided to go with Pelican
Tags: pelican, python
Published: 2019-11-21 00:25:51

---
title: Why I decided to go with Pelican
published: true
date: 2019-06-17 16:05:00 UTC
tags: Pelican,Python
canonical_url: https://trevdev.ca/blog/why-i-decided-to-go-with-pelican/
---

I tend to get excited when I explore something new and I've gotten into the habit of making [this website](https://trevdev.ca) the focus of a new obsession.

When I first wrote this website, it was with the brand new HTML/CSS/JavaScript skills that I had learned. Then I learned Python and re-wrote this website to be more dynamic with the use of [Flask](http://flask.pocoo.org/). Months later I started learning reactive JavaScript front-ends and ended up re-working my porfolio into a single-page React application. I was mostly happy with it at that point, but I felt like I was still missing a couple of things.

I wanted a blog and didn't want to write one in JSX or do some sort of hacky markup rendering. The SEO wasn't quite up to snuff and I wanted something that would render really well in older/less accessible browsers. I also wanted something low maintenance and felt like React may have been overkill for a portfolio or a blog. Needless to say, it's easy to get carried away with new things.

> Static site generators are fast, simple and secure

I had heard about [static site generators](https://www.sitepoint.com/static-site-generators/) while reading about them on Twitter and Mastodon. It ocurred to me that that static sites in general are wonderful and there are many reasons to use a static site generator:

- They provide content management (like WordPress), but without _any of the bloat_.
- They make it easy to write pages and posts in simple document formats (like Markdown).
- They generate _very secure_ websites. It's just static content. There are no databases or backends to exploit outside of the web server itself.

After reading a few articles about the various static site generators out there, I decided to go with _Pelican_ for a few reasons. Pelican is very mature, written in Python , highly customizable/configurable and has many features included. For example, it generates pages based on category, date, author and tag. You can also leverage custom post/page metadata and pass it to jinja powered templates that are very clear and easy to reason with. To deploy them, all you need is FTP or shell access to a shared host provider. You could also easily deploy a static website for _free_ using something like _Netlify_ or _Github Pages_.

To boot, there are [dozens](https://github.com/getpelican/pelican-plugins) of plugins for Pelican. Since I enjoy Python, it wasn't all that challenging for me to write my own plugin for a niche situation like my VueJS powered [comment system](https://github.com/trev-dev/pcs-serializer).

Pelican is also really [well documented](https://docs.getpelican.com/en/stable/). This came in super handy while figuring out how to properly write a new theme and create special page templates like my home page and my portfolio category page.

The only drawback that I can think of is that Python is slower than some of the newer static site generators like Hugo. That being said, I'm still able to render this website in under half a second, and that's fast enough for me.

I'm super happy with what I've created with Pelican and am excited to share some of the tips & tricks I learned along the way. I don't think I'll be switching my website up any time soon.