Brian Downs


Software Engineer, Open Source Advocate, Outdoor Enthusiast


briandowns.github.io

I searched a bit for a decent system to build a static site and I really wanted to do it using Go. I hadn’t come across anything except a number of Python and Ruby static site generators (Jekyll and Hyde) that seemed to do the trick but didn’t really interest me. Then I found Hugo.

So I found Hugo. Great. Now what. I’m not a UI guy, or a front-end guy, etc. That being the case, clearly I needed a hand and thankfully, SenjinDashiva came through with hugo-uno.

Setup is super simple and with the help of a little deploy script below, creating new files ( hugo new path/to/resource/file.md ) and updating the site in general becoems less than significant.

#!/bin/bash

#
# Simple script to deploy new code to my website
#

echo -e "Deploying updates to Github..."

GIT=$(which git)

# Build the project
hugo && \

# Add changes to git
${GIT} add -A

# Commit changes
MSG="rebuilding site `date`"

if [ $# -eq 1 ]; then
    MSG="$1"
fi

${GIT} commit -m "${MSG}"

# Push source and build repos
${GIT} push origin master

exit 0

Update

After a week or so now using Hugo for this site, I couldn’t be happier. The system is so simple to use and I actually look forward to using it when I have content I want to put up.