Blog Workflow

If you were curious how I go about writing posts for this blog, keep reading. If not, there’s plenty of internet out there to hold your attention.

The main tools I use are:

  • hugo
  • vim
  • aspell
  • ssh
  • bash
  • ipfs

Static Site Generator - Hugo

I use the static site generator hugo for generating this site with a minimally customized Mainroad. There really isn’t a lot to talk about here that I haven’t already covered elsewhere.

Text Editor - vim

Yes, I use a non-graphical text editor for writing every single one of these posts, for editing the hugo configuration files, and for editing the script files that automate publishing this blog to IPFS. I rarely use a graphical text editor (and when I do, its usually leafpad, a notepad clone).

I ended up using this editor because I can rely on it or its ancestor vi, to be present on just about every Linux computer in existence. When you are working on someone else’s computer where you can’t install software, that’s handy. It also works across ssh reliably, unlike graphical editors with X11 forwarding.

I don’t use ed because it is painful to use in addition to being ancient, and was using vim well before I knew that Emacs existed, and I’m not changing now that I have muscle memory built where I don’t have to think about how to do things, my hands just about move on their own once I decide that I want something to happen, which is rather handy.

Spell Checking - aspell

This is a command line spell checker. There is probably a way to integrate this into vim, but I haven’t been bothered to go figure it out. Maybe some other time.

Remote Access - ssh + screen

The files for my blog reside on my always-on Network Attached Storage (NAS) server and not on my workstation. While I could use an NFS mount to access the files, I’m using ssh because I can not only access the files from my local workstation, but I am able to access it from the other side of the world given an internet connection.

Once connected with ssh, the first thing I do is start or resume a screen session. If you don’t do this yourself, look into it. Programs started with screen will remain running even if the ssh connection drops. You just log back in and run screen -r, and you are back where you left off.

Automation - bash

When you have to do something more than a handful of times, automating the process is a good idea. Not only does it save time as you don’t have to type the commands repeatedly, it ensures consistency as you can’t forget to do an important step. For automation, I use bash scripting for most tasks because it is written exactly as I would type the commands at the command prompt.

Publishing - IPFS

Until yesterday, if you are reading this blog, you would have to know about IPFS. Yesterday I setup a dnslink with an existing domain I have. You can see it from this link. The zone file items are:

blog.polaris-1.work.          300  IN   CNAME   gateway.ipfs.io.
_dnslink.blog.polaris-1.work. 300  IN   TXT     "dnslink=/ipns/k2k4r8nha6av4c0eespqbz0rq85m8dy51tcddznmd095fqim5scgj2re/"

I am intentionally using IPNS for this, in part because there are performance issues with it. If people are not using it, there won’t be the pain will that provides the motivation to fix the issues. Additionally, IPFS was designed with the idea of using IPNS to allow for updating sites in a content-addressed network.

Comments