Recursive Blogging

Posted on Thu 04 October 2018 in technology

This is my submission for that most irritating genre of technology writing, the blog post about setting up a blog.

It's more a note to future me on how specifically to get this blog running on a new machine than it is a general guide on how to run a Pelican-based website... but if it helps anyone else, well, you do you.

Preliminaries:

~> sudo pkg install gmake python3 python36 py36-pip

I use Pelican to generate this blog statically:

~> pip-3.6 install pelican --user

Pelican depends on Markdown. Why this isn't pulled in automatically is beyond me.

~> pip-3.6 install Markdown --user

The flex theme is nice.

~> git clone https://www.github.com/kchoudhu/flex
~> pelican-themes -i ./flex

Get the source for the blog:

~> git clone https://www.github.com/kchoudhu/blog

You use footnotes on this blog, so enable them using a plugin:

~> git clone https://github.com/getpelican/pelican-plugins

pelicanconf.py already points to the plugin directory and will pull in the footnotes plugin, so there's no additional setup to be done.

Start the devserver, which will serve on port 8000:

gmake devserver

Work on a new article:

gmake newblog ASUM=a-dash-separated-slug

This will put you on a new branch and create a shell article, which you will have to merge back to master in order to publish:

~> git branch
* a-dash-separated-slug
  master

Use rsync to publish everything once you've merged:

~> git merge a-dash-separated-slug
~> gmake rsync_upload

Congratulations, you have written stuff on the internet that no one is going to read. Shouldn't you be doing real work instead?