diff options
author | Hudson Muff <thedodobird2@users.noreply.github.com> | 2018-03-23 17:34:45 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-04-09 18:06:21 +0200 |
commit | fca49d6c608d227049cb2f26895cfecc685f1c89 (patch) | |
tree | 4715179c6ad54c18b0db750f6cf11fcbaff1a0a4 /README.md | |
parent | 0e8b3cbcd274e1f2e14be694c794a544f49efb56 (diff) |
Update README.md
I discovered an inconsistency between the website documentation (https://gohugo.io/getting-started/installing/#source) and this README, for installing from source. I checked them both and the website seems to be newer so I would like to propose updating this README to install Hugo using mage (unless it doesn't really matter).
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 23 |
1 files changed, 18 insertions, 5 deletions
@@ -54,15 +54,28 @@ Use the [installation instructions in the Hugo documentation](https://gohugo.io/ ### Build and Install the Binaries from Source (Advanced Install) -Add Hugo and its package dependencies to your go `src` directory. +#### Prerequisite Tools - go get -v github.com/gohugoio/hugo +* [Git](http://git-scm.com/) +* [Go (latest or previous version)](https://golang.org/dl/) -Once the `get` completes, you should find your new `hugo` (or `hugo.exe`) executable sitting inside `$GOPATH/bin/`. +#### Vendored Dependencies -To update Hugo’s dependencies, use `go get` with the `-u` option. +Hugo uses [dep](https://github.com/golang/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. - go get -u -v github.com/gohugoio/hugo +The simplest way is to use [mage](https://github.com/magefile/mage) (a Make alternative for Go projects.) + +#### Fetch from GitHub + +```bash +go get github.com/magefile/mage +go get -d github.com/gohugoio/hugo +cd ${GOPATH:-$HOME/go}/src/github.com/gohugoio/hugo +mage vendor +mage install +``` + +**If you are a Windows user, substitute the `$HOME` environment variable above with `%USERPROFILE%`.** ## The Hugo Documentation |