Building a Personal Site using Pelican

Posted on 12 Oct 2017 in Full-Stack Web Development • 2 min read • updated on 2017-11-15 19:00:00+01:00

I would like to share my experience building this site using the Pelican site generator. In the last two years, I was trying several CMS, web frameworks and static-site generators for different purposes. At the end, I found out that Pelican is the most suitable for my requirements. But wait, what was my motivation for that whole works and for the reader? The motivation of this article is to explain how to build a professional personal site which is free.

The definition of a professional site can be vary for each person. Thus, here are my requirements for my professional website:

  • a light and simple web framework
  • easy to use and to deploy
  • Markdown support
  • modular and can be customized easily
  • if possible Python based


These are the CMS that I've tried:

  • WordPress
  • getSimpleCMS
  • Django CMS
  • Mezzanine
  • Grav
  • Wagtail
  • Quokka CMS

Compared to the static site generator, the CMS's above are not light enough and many components are redundant.

I tried Jekyll, however, for me, it has too few features. Before I decided to choose Pelican, Nikola was my favorite until I had difficulties to customize a theme. In my opinion, Nikola has too many file dependency in order to customize a theme.

After some research and testing, I found out that the flex theme is very suitable for my design. Furthermore, the theme provides a very professional configuration setting.

Publishing with Github and Cloudflare

In order to publish my site freely, I can use the Github Pages service. I created a new repository <username>, and pushed only the output folder from the pelican to the repository. I followed the tips from the documentation [1]. However, I use the instead of I summarized these command lines to a shell script:

pelican content -o output -s
ghp-import output
git push -f<username>/<username> gh-pages:master

Don't forget to install the ghp-import with pip install ghp-import, and read the extra tips #2.

Unfortunately, I had difficulties to publish my site after pushing the CNAME. The first reason was that the stylesheet and the other resource files are called with the custom domain as the base URL so that the resource files cannot be found. Seconds, there is an incompatibility between HTTP and HTTPS communication during the data request to the server. I need a separate certificate for my domain if I want to use HTTPS since the GitHub certificate only supports the * domain.

To solve this issue, I use the Cloudflare service to set up my HTTPS site. Thanks to these guides ([2], [3], [4]) that I can setup SSL for my personal site.