I hadn’t updated my theme for a while. I have been getting deprecation warnings on a few things for some time and they turn into deprecation errors in the next version of Hugo, so it was time to fix them. The hardest part was making git understand that I wanted to use an ssh-key to update the submodule. Updating should have been as simple as: cd theme\harbor $ git add .
Read MoreResurrection
Last week, I had a new battery installed in an old MacBook Pro. The battery was swollen and didn’t hold a charge so I took it over to Mr. Fix and they replaced it for $135. I probably could have done it with a kit, but it was much easier to have someone who does this all the time do it. My new MacBook Air M2 is great, but sometimes it’s nice to have a beater that can be used when you need a computer to use somewhere where it might get damaged (e.
Read MoreShortcode fun
I’ve been using Hugo for this blog for a few years now. It works well for me and I’ve not done much customization to the theme at all. Earlier this year, I took at look Mermaid to produce some charts for inclusion in the blog. The way that worked was by using a link to content hosted on another site. That was really easy to do, but I’d rather have the content inside my blog content.
Read MoreBit Rot
I noticed the other day that the search function on this blog had somehow been broken. I’m not sure how as I’ve not changed anything recently in the layout or functionality. In any event, it wasn’t working and I wanted to fix it. After a quick look at the harbor theme README.md indicated that I needed to have a search.md file in the content directory. I didn’t have it so I created the very simple file and added it.
Read MoreAlias for post creation
Hugo has worked out well for creating this blog. To make it even easier, I wanted to make creation of new posts simpler. To date, I’ve basically looked at the last post and then created the next one in sequence by using the command hugo new ~/myblog/post/content/091.md, for example. To automate that some, I created a bash alias that looks like: alias newpost='hugo new ~/myblog/content/post/$(printf "%03d.md" $(expr $(basename $(ls ~/myblog/content/post/ | tail -n 1) .
Read MoreBlog restructure
I felt the need to renumber my blog posts file names from a date (e.g., 20211222.md) to a sequence (e.g., 087.md). Hugo does a nice job of putting posts from the same date into a folder labeled for that date, so the date numbering was restrictive if I wanted to create two posts on one day (admittedly, a rarity). A number also is a nice way for me to keep track of how many posts I’ve written since I started doing this again.
Read MoreHugo on Mac
I’ve been using Hugo for a little while now on Linux. Since I had my MacBook with me this weekend, I wanted to give it a try. It was easy. The first thing to do was to do a git clone for my blog content. Nothing surprising there. Next, I installed Hugo using brew install hugo. That took a few minutes but got me v0.76.5/extended on the Mac. No issues.
Read MoreUpdates to harbor theme
As I posted before, I switched my theme over to harbor which I quite like. However, I wanted to make some changes to the look and feel of the page. There is a way of overriding the CSS in a Hugo theme but it wasn’t part of harbor. So, I created an issue on github to see if had just missed the feature. Much to my delight, the author of the theme picked it up and did a change to the theme this weekend so I could do a simple override and change up a few font colors.
Read MoreFixed a few things
I listed three things to fix after my theme migration. I added some reasonable text to the about page and found the source of the weird cruft on the last page of posts. It turns out that somehow I had corrupted the text of one of my old posts and substituted the contents of a PNG file. I’m not sure how that happened but the fix was easy: delete it.
Read Moregit submodules
As part of my switch to a new theme, I followed the instructions in the harbor theme to add the theme: $ # install $ mkdir themes $ cd themes $ git submodule add https://github.com/matsuyoshi30/harbor.git harbor That worked and everything was rendering fine using hugo serve on my main system. Sometimes, I use a different system to write posts and I wanted to get the updated code on there. After merging my pull request in github, I ran git pull to get the site updated on my laptop and created a new post.
Read More