I use Debian in this example, but any apt-based distro will be similar.
Enable and pin the Debian Backports and Testing repos so you can get recent versions of Hugo and needed tools.
# Assuming you have enable backports as per above sudo apt install -t bullseye-backports git sudo apt install -t bullseye-backports golang-go
For a recent version of Hugo you’ll need to go to the testing repo. The extended version is recommended by Hugo and it’s chosen by default.
# This pulls in a number of other required packages, so take a close look at the messages for any conflicts. It's normally fine, though. sudo apt install -t testing hugo
A quick test right from the quickstart page to make sure everything works
hugo new site quickstart cd quickstart git init git submodule add https://github.com/theNewDynamic/gohugo-theme-ananke themes/ananke echo "theme = 'ananke'" >> config.toml hugo server
Open up a browser to
http://localhost:1313/ and you you’ll see the default ananke-themed site.
The ananke theme you just deployed is nice, but a much better theme is Docsy. Go give that a try.
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.