Getting started with Hugo

Installing Hugo with apt resulted in version 40.1, instead of version 53.

sudo apt-get remove hugo
sudo apt install snapd
snap install hugo --channel=extended
vi ~/.bashrc

And in there, added the line:

# Add snaps to path
export PATH="/snap/bin:$PATH"

Save and then:

source ~/.bashrc
hugo version

Which should say “Hugo Static Site Generator v0.53/extended linux/amd64 BuildDate: 2018-12-24T12:58:46Z” with a date within the past month and the same version number as at the top of https://github.com/gohugoio/hugo/releases

A Sidetrackment

Deploying with GitLab’s pages feature will fail if your submodules aren’t just right, so if you don’t want a theme brought in as a submodule and you sort of did, you’ll want to remove that, which is remarkably complicated in Git. I had to do:

git rm --cached themes

and then add it back, but whatever your git submodule situation this guide should have you covered:

https://chrisjean.com/git-submodules-adding-using-removing-and-updating/

Disclosure, that got GitLab to build the site for me, but as far as the site being visitable anywhere on the public web— it’s not working at all.