Install Hugo on Ubuntu to generate static websites
By Leo Gaggl
Whilst there is a .DEB installer to download from the GoHugo sites I get all matter of warnings that the package is of bad quality and I am not comfortable to run these kinds of installers.
I rather install from sources in this case which is very straight forward since the main dependencies (largely GO) are in the Ubuntu main repositories.
Install dependencies
sudo apt-get install golang git mercurial python-pygments
Create environment variables
vim ~/.bashrc<br></br>#add the following 3 lines<br></br>export GOROOT=/usr/lib/go<br></br>export GOPATH=$HOME/go<br></br>export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
Update Bash Environment Variables without logging out.
source ~/.bashrc
Install Hugo
go get -u -v github.com/spf13/hugo
Start using Hugo
#create new site<br></br>hugo new sitename /path/to/sitename<br></br>#change directory to site<br></br>cd /path/to/sitename<br></br>#create content page<br></br>hugo new about.md<br></br>#edit content page<br></br>vim content/about.md