Over the last week or so, I’ve enjoyed updating the tools I use for this site,
which is built using Hugo. Hugo creates static HTML from Markdown source, and
is perfect for low volume sites that are updated on an occassional basis, and
that hasn’t changed. The tooling I use to host the site has changed, along
with the method i use to upload the new HTML to the web host.
In the past, I used GitHub Pages to host this site. When I added or changed a
page, I’d run Hugo to convert the Markdown into HTML, and then use git commands
to push the updated HTML to GitHub. The repository it was posted to was
configured to use GitHub Pages to server the actual website. This process
worked reasonably well, but some underlying tech issues made it necessary to
change course.
Here are the tools I use on my Windows 11 laptop:
-
GIT bash - a Linux terminal running the bash shell
-
VIM for editing - I learned vi back in the late 1980’s and used it almost
exclusively for 35 years - I’m very comfortable with it.
-
Syncthing - this tool runs on the laptop and on the VPS, and automatically
uploads modified directories from the laptop to the VPS.
These tools run on a Digital Ocean VPS running Ubuntu 24.04:
-
Apache Web Server
-
Syncthing, running in a Docker container using Portainer
And here’s a brief overview of the workflow for adding a new post to the web site:
-
A new page is added using Hugo’s Markdown format (no change here)
-
The hugo tool is run to convert the Markdown into HTML (again, no change)
-
Hugo writes the updated site files to a local folder on the laptop.
-
Syncthing automatically uploads the site files to the VPS. The files go to
the directory configured in Apache as the DocumentRoot.
Once the sync is complete, the site update automatically goes live.
There’s a couple of minor issues that I’m looking into, but nothing urgent.
-
Syncthing uploads files in a pseudo-random sequence, and if you load the web
url in your browser before the sync completes you may get some wonky
behavior. I have some ideas on how to fix this, but it’s not a big deal at
this time.
-
Once I removed the git commit/push steps, I no longer have active source
control. In practice, this isn’t a big deal, but there are times where it
would be nice to monitor each individual change made to the site files. I
played with a Windows install of Gitea, but was temporarily defeated by the
SSH/HTTPS configuration, so that’s on hold for now.
The new tooling gave me a chance to reconnect with my tech knowledge, which was
fun.