Building a Personal Site using Pelican
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:
- Django CMS
- 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>.github.io, and pushed only the output folder from the pelican to the repository. I followed the tips from the documentation . However, I use the
publishconf.py instead of
pelicanconf.py. I summarized these command lines to a shell script:
pelican content -o output -s publishconf.py ghp-import output git push -f https://github.com/<username>/<username>.github.io.git gh-pages:master
Don't forget to install the
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