“And one day, for no reason at all, he decided to create a knock off Xitter”.

Me after creating this bit of the site
So, it’s rolling around to be around eleven months since I last wrote anything for the site. It’s been a fairly busy year for me: the 2nd year of the engineering degree did, as I was warned, turn out to be the most time consuming. That’s OK, since I actually enjoyed it the most so far, but it left little time for much else in my free time. I’ve treated this as a good learning opportunity for later life: having the ability to still do most of what you want and need in life whilst working flat out. In the process, I learnt that doing my usual and only publishing thoughts when they’re fully developed into a nicely produced long-form article just leads to diminishing returns and, eventually, a bit of a drought.
The new µBlog will hopefully fix all that.
How does it work?
Well, that’s actually really simple. Hugo is, as with the rest of the site, doing most of the work. Entries are created in the /ublog/ directory and then loaded and listed in order of most to least recent on the index page for the directory. The only involvement I had in the process was designing the layout of the list and some basic pagination customization. The only details required in the blog entries themselves is a valid ISO 8601 date in the frontmatter and then everything else is ignored.
The list template in Hugo just does what the lists for every other page does, except that it also includes the page’s .Content method in the list page (unusual for longer pages).
Each post is uniquely identified by the date it was posted on and it being the nth post of that day. Each post has an HTML id set equal to its unique identifier in this way (the link on the left), which allows linking to these posts, despite them not really having their own page.
How do I maintain it?
Now, that’s all that there is for the technical details of the website itself. As for the blogging system, though, I did have a little more involvement there. µBlog is interfaced through a little shell script at the root of the site’s source tree called ublog. It’s interface is modelled after git’s interactive staging menus.

The menu after first running ublog
As you can see, the blue prompt on the left hand side shows a file name. This is automatically generated, with the prefix being the current date (in DD-MM-YY) and then a suffix which depends upon the number of entries from the current day. The first entry for a given day has no suffix, then each subsequent one has one, beginning at 1. So, on the day I am writing this, three entries have already been created (that with no suffix, then _1 and _2 in order).
Anything typed after the prompt is copied verbatim into the markdown file after the frontmatter, which is automatically added by Hugo when the file is first written to.

A demo µblog post that I will write and publish for the creating of this main post. Upon running /p here, the post will go live on the site.

The view after running the vim command in ublog. You can see the frontmatter Hugo generated here.
The tool accepts a variety of commands, which are all prepended by a forward slash (I found it unlikely that I would need to write a new line into a blog entry that began with a single forward slash). The most important of these are:
/publish: which runs theublogupdatescript/file: which allows the manual overriding of the generated filename, including to that of an existing file to overwrite/edit/vim: which opens the file in (n)vim for editing/open: which runslfto visually select a file to edit

Up, up and away to the server! This process takes under a second.
The publish speed is greatly improved by a new script called ublogupdate, which only erases and re-uploads the microblog content directory (although it does re-compile the whole site, by necessity). The bottleneck in site builds tends to be the network anyway, as Hugo is so fast. I did it this way to encourage me to make frequent, short posts rather than collating many and not publishing them.
What will you be using it for?
Well, nothing with any effort put in, that’s for sure!
The idea of it is basically that I can share little thoughts or observations that don’t require a full post on their own, or maybe to publically archive cool stuff that I found. Image support is bare: only a single image per post is really what I can support, which further cuts down on the capability for “misuse” by me.
Going forward
I actually posted a few projects that I am working on in the second microblog post. Many of these are now enabled by my finally having figured out how to get MathML to work correctly in Hugo (it turns out I enabled it wrong in the frontmatter - doh!).
Anyway, here’s a sneak peak: