passthejoe — the blog

Friction in the Hugo composition process — Part 1

I would write more, I say, if it was easier to start, write and publish a blog entry.

I have a Bash script that allows me to easily write and publish microblog-style entries. Maybe I should come up with something similar for Hugo. It’s been on my to-do list.

I can write tweets quickly. But a Hugo blog entry is a different thing.

There’s a bunch of metadata at the top of the post. You need a title, time and date, author name and Twitter handle field. I guess I can forget about that last one in the Elon era. And then there are tags. And I can choose, post by post, whether to show the full post in the index, or not. There’s an optional description that makes the blog listing pages look much better. You have to come up with a file name.

Then you need to build your Hugo site and upload the output to a server. Much of this can be automated. Some do it “professionally” with git and some kind of continuous integration setup.

For my microblog, I do things the ’90s way. With scripts. When I fire up my Ruby-scripted command-line program called blogPoster, I can compose a short (or longer) entry, edit it with Vim (or many other text editors) and then send it to a customized blog that displays microblog-style entries (i.e. no title, just text) and optionally sends that post to Twitter and Mastodon. Again, my life just got simpler because Elon’s Twitter kicked me (and many, many others) out of the site’s API, which my program relies on to post from Ruby.

I kicked it up a notch with my CentOS update sites. I have two, and they are identical, except one runs on the FreeBSD-based NearlyFreeSpeech.net shared host, and the other is on the OpenBSD-based Tilde.institute free Unix shell and web space service.

Both use scripts, one written by me, another by now-former CentOS community manager Rich Bowen (an all-around great and helpful person) to take XML on updates generated by the CentOS project and turn that into Hugo blog posts. I don’t do anything. The blogs runs themselves.

In this case, feeds and scripts take out all the friction. I even automatically post to Twitter and Mastodon. when a post is created. (And it’s time to turn off Twitter on account of the turn it has taken.)

But how can the friction be removed from human-created (i.e. normally written) posts? That’s what Part 2 will be about.

#Hugo #Writing #Scripting #Vim #Ruby