How this site is published

So, how is this site published. The footer should let you know that I’m using Hugo, which is basically a static site generator written to be deployed as a single executable. It has a fixed layout for the input files, you add a markdown file into the ‘content/posts’ subdirectory, and it just, generates a site for you under the ‘public/’ directory. The only tricky part is how it uses themes.

There is a ‘config.toml’ file in the root of the working folder that specifies the name of the theme. That corresponds to one of the subdirectories under the ’themes/’ directory. You put themes into that directory normally as git submodules so you can track changes in the theme, but honestly I know so little about Git that I have forgotten how to do that. The only quirk is that when you ‘git clone’ you need to include submodules.

I host the site as a private repo on Microsoft GitHub (because yes I think we need to remind ourselves of this along with Microsoft LinkedIn). I edit mainly using Vim on Android within a Termux session using a 10 buck bluetooth keyboard, then rsync the content of the ‘public’ folder to tilde. Doing this the ‘git’ way finally forced me to setup SSH keys on GitHub.

The only real annoyance where I gave up in frustration a couple of times was why Hugo was refusing to show some posts. Turns out the ‘date:’ field is taken to mean the publication or perhaps embargo date, and adding to that timezones get a little confusing. So I’d write a post, see it on the localhost draft server, but would not see it generated in the public/ folder. Annoying!

I have technical notes and snippets for all the commands for the above that I could alt-tab to and copy and paste, but seeing as though zero people are going to read this, I’ll wait for the first email requeset to to do so. Lazy days!

What would be nice is if I could set up some sort of automatic rendering for when I push to git. I get an uneasy feeling about storing my credentials there so perhaps I need to do something on one of my many Raspberry Pis first.

Finally, I have a ’notes.txt’ in the root of the repo which has the list of awful topics that pop into my head that I should write about. I have purposefully been just putting them out in a random order without much regarding for the quality just to test this pipeline and get more used to semi-regular writing and publication, such that when I actually have something I would like to say, I’ll be thinking more about the content and less of the mechanics which will hopefully have become obvious to me by then.