Hugo

Building Hugo from Source with Go Modules

As of yesterday to build the latest Hugo Dev from source I simply issue the following 2 commands:

go get -u -v github.com/gohugoio/hugo

Fetches everything, Hugo dependencies (Go modules) and latest repo commits (no need to maintain a fork, no need to use git pull etc). N.B. In the above -v stands for verbose (you can remove it if you don’t want it.

Then from within $GOPATH/github.com/gohugoio/hugo run:

go install

Or even:

go install -tags extended

To get the extended version.

It will be installed to $GOPATH/bin
N.B. $GOPATH stands for the environment variable of your local Go workspace.

That’s about it.

3 Likes

You can replace the above with:

go install

Or even:

go install -tags extended

To get the extended version.

It will be installed to $GOPATH/bin

4 Likes

Even simpler. Thank you! I amended the first post.