Jack's Blog

Creating a Blog with Pelican and Caddy

How (and why) I created a blog to keep my notes organized

Since ~2018, I've been keeping a personal website and I love it. I don't update it nearly often enough, but I think it's a really fun way to express myself and keep a public record of things I enjoy. The biggest barrier to updating it more often is that I still wrote everything in raw HTML. There is something special about that, but I there have been so many instances where I want to crank something out that is mainly textual without wanting to bother with a million <p>'s. Webdev is not my strong suit, but I still want to put out information into the world. Wordpress and Ghost are super powerful tools, but I really just needed blog small textual posts and an RSS feed. I learned about static site generators it was time to actually use one. My criteria were:

  1. In a language that I know decently enough (python, Rust, or C++)
  2. Comes with an RSS feed by default
  3. Allows me to write in Markdown (I know it isn't neccessarily the best, but I'm used to it)

Jekyll is extremly popular, but I didn't want to install Ruby. Zola seemed interesting, but too customizable for my needs. There didn't seem to be any popular C++ tool. I found Pelican and it seemed like the absolute simplest.

I hope to have more posts and slowly make this my main place to jot things down. Thanks for reading!

Steps for creating my Pelican site

  1. Created venv via python3 -m venv venv
  2. Installed Pelican[markdown] pip install "pelican[markdown]"
  3. pelican-quickstart
  4. Looked through themes and decided to modify "simple" and "basic" ever so slightly. You can check it out on my gitlab page here.. Place this in the "theme" folder.
  5. Set SITEURL = "https://jackmcintoshthomson.com/blog" in publishconf.py. Leave pelicanconf.py's SITEURL alone so you can properly see css in your local dev env.
  6. Create a new .md file in the content folder, add my blog content.
  7. Run make devserver to and look at http://127.0.0.1:8000 to see my post's contents
  8. Run make publish and copy over to my VPS TODO automate this process
  9. Serve via Caddy. The /blog part needs to be carefully put in!