diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-08-29 14:21:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-29 14:21:20 +0200 |
commit | 312d2252be6b7bf250fa4f8b1b541fdc13641940 (patch) | |
tree | 3e3b8b7d9fb4633ce2c3e623a6dda269f226bb9d | |
parent | f627903efaa1a5f7e137c2d409efd1e1e2db47f6 (diff) |
Update CONTRIBUTING.md
-rw-r--r-- | CONTRIBUTING.md | 33 |
1 files changed, 13 insertions, 20 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 87199a411..5e2cff64d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -106,30 +106,23 @@ Fixes #1949 ### Fetching the Sources From GitHub -Due to the way Go handles package imports, the best approach for working on a -Hugo fork is to use Git Remotes. Here's a simple walk-through for getting -started: +Since Hugo 0.48, Hugo uses the Go Modules support built into Go 1.11 to build. The easiest is is to clone Hugo in a directory outside of `GOPATH`, as in the following example: -1. Get the Hugo source: - - ```bash - go get -u -v -d github.com/gohugoio/hugo - ``` - -1. Install Mage: - - ```bash - go get github.com/magefile/mage - ``` +```bash +mkdir $HOME/src +cd $HOME/src +git clone https://github.com/gohugoio/hugo.git +cd hugo +go install +``` -1. Change to the Hugo source directory and fetch the dependencies: +For some convenient build and test targets, you also will want to install Mage: - ```bash - cd $HOME/go/src/github.com/gohugoio/hugo - mage vendor - ``` +```bash +go get github.com/magefile/mage +``` - Note that Hugo uses [Go Dep](https://github.com/golang/dep) to vendor dependencies, rather than a simple `go get`. We don't commit the vendored packages themselves to the Hugo git repository. The call to `mage vendor` takes care of all this for you. +Now, to make a change to Hugos's source: 1. Create a new branch for your changes (the branch name is arbitrary): |