mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
Update CONTRIBUTING.md
This commit is contained in:
parent
f627903efa
commit
312d2252be
1 changed files with 13 additions and 20 deletions
|
@ -106,30 +106,23 @@ Fixes #1949
|
||||||
|
|
||||||
### Fetching the Sources From GitHub
|
### Fetching the Sources From GitHub
|
||||||
|
|
||||||
Due to the way Go handles package imports, the best approach for working on a
|
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:
|
||||||
Hugo fork is to use Git Remotes. Here's a simple walk-through for getting
|
|
||||||
started:
|
|
||||||
|
|
||||||
1. Get the Hugo source:
|
```bash
|
||||||
|
mkdir $HOME/src
|
||||||
|
cd $HOME/src
|
||||||
|
git clone https://github.com/gohugoio/hugo.git
|
||||||
|
cd hugo
|
||||||
|
go install
|
||||||
|
```
|
||||||
|
|
||||||
```bash
|
For some convenient build and test targets, you also will want to install Mage:
|
||||||
go get -u -v -d github.com/gohugoio/hugo
|
|
||||||
```
|
|
||||||
|
|
||||||
1. Install Mage:
|
```bash
|
||||||
|
go get github.com/magefile/mage
|
||||||
|
```
|
||||||
|
|
||||||
```bash
|
Now, to make a change to Hugos's source:
|
||||||
go get github.com/magefile/mage
|
|
||||||
```
|
|
||||||
|
|
||||||
1. Change to the Hugo source directory and fetch the dependencies:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
cd $HOME/go/src/github.com/gohugoio/hugo
|
|
||||||
mage vendor
|
|
||||||
```
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
1. Create a new branch for your changes (the branch name is arbitrary):
|
1. Create a new branch for your changes (the branch name is arbitrary):
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue