Pelican setup

The Pelican setup and Markdown source of this blog are kept in Git for version control, pushed to a private git repository. Occasionally I'll remember to push to the public GitHub mirror as well.

Pelican is a static html generator written in Python. I've added css processing to its default Makefile, using postcss and cssnext.

I maintain a python virtualenv with Pelican and other needed packages. At need, the directory can be rebuilt with a combination of pipenv (for the python) and yarn (for the nodejs packages). Articles and pages are written in Markdown. Finally, a make publish and make rsync_upload command on the command line will generate and upload the site.

This setup offers several advantages over writing the html pages by hand:

  1. I can change the site look and feel at a whim, and change it on all pages by regenerating them all with one command.
  2. When writing content, I can focus on writing (essentially) plain text and ignore things like look-and-feel.
  3. Since the content is markdown, and the templates are python jinja2 html templates, I can use the same tools to write this site (vim for editing, linux-as-ide, git for version control) that I use every day for writing code professionally.