Install Hugo on Ubuntu to generate static websites
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-pygmentsCreate environment variables
vim ~/.bashrc
# add the following 3 lines
export GOROOT=/usr/lib/go
export GOPATH=$HOME/go
export PATH=$PATH:$GOROOT/bin:$GOPATH/binUpdate Bash Environment Variables without logging out.
source ~/.bashrcInstall Hugo
go get -u -v github.com/spf13/hugoStart using Hugo
# create new site
hugo new sitename /path/to/sitename
# change directory to site
cd /path/to/sitename
# create content page
hugo new about.md
# edit content page
vim content/about.md←Good bye Android ? Hello Ubuntu ! Not yet unfortunately ...
Giving Opera another spin - ad-blocking as a core feature→
Comments
Be the first to comment! Reply to this post from your Mastodon/Fediverse or Bluesky account, or mention this post's URL in your reply. Your comment will appear here automatically via webmention.
Follow this blog on Mastodon at @gaggl.com@web.brid.gy or on Bluesky at @gaggl.com
