Update 'Fetch from Github' installation instructions in line with Github README

This commit is contained in:
Sapphire Mason-Brown 2018-09-20 09:02:15 +01:00 committed by Bjørn Erik Pedersen
parent d9f06c23c4
commit 340c9c6236

View File

@ -75,22 +75,18 @@ scoop install hugo
#### Prerequisite Tools #### Prerequisite Tools
* [Git][installgit] * [Git][installgit]
* [Go (latest or previous version)][installgo] * [Go (at least Go 1.11)](https://golang.org/dl/)
#### Vendored Dependencies
Hugo uses [dep][] to vendor dependencies, but we don't commit the vendored packages themselves to the Hugo git repository. Therefore, a simple `go get` is *not* supported because the command is not vendor aware.
The simplest way is to use [mage][] (a Make alternative for Go projects.)
#### Fetch from GitHub #### Fetch from GitHub
Since Hugo 0.48, Hugo uses the Go Modules support built into Go 1.11 to build. The easiest way to get started is to clone Hugo in a directory outside of the GOPATH, as in the following example:
{{< code file="from-gh.sh" >}} {{< code file="from-gh.sh" >}}
go get github.com/magefile/mage mkdir $HOME/src
go get -d github.com/gohugoio/hugo cd $HOME/src
cd ${GOPATH:-$HOME/go}/src/github.com/gohugoio/hugo git clone https://github.com/gohugoio/hugo.git
mage vendor cd hugo
HUGO_BUILD_TAGS=extended mage install go install
{{< /code >}} {{< /code >}}
Remove `HUGO_BUILD_TAGS=extended` if you do not want Sass/SCSS support. Remove `HUGO_BUILD_TAGS=extended` if you do not want Sass/SCSS support.