It’s been about nine months since I’ve written any posts. With that long a layoff, I’m not surprised that I couldn’t remember how Hugo works. Especially in the context of the Incus container that I’m running it in.
First things first, I ran a apt update && apt upgrade on the container. Then, did a git pull to retrieve any updates I’d made on a different system. Those things are pretty simple.
After that, had to remember how to start Hugo to render the pages and serve them. That was not so simple. The secret sauce is to specify both the bind and base flags so it can be seen on the host of the container hugo serve --bind 10.159.44.244 -b 10.159.44.244 using the IP address of the container.
A little script to do that might make it easier next time (which I hope is not in 9 months):
hugo serve --bind $(hostname -I | awk '{print $1}') -b $(hostname -I | awk '{print $1}')