mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
b59dd163ec
* Add link to https://travis-ci.org/spf13/hugo * Correct heading levels in docs/content/community/mailing-list.md * Mention RFC 3339 as the `date` format set by `hugo new` * Mention that `hugo new` does not add `draft = true` when the user provides an archetype * List short examples of TOML and YAML side by side * Compact the Math template functions into a table * Put some notes into a blockquote
2.1 KiB
2.1 KiB
aliases | date | menu | next | prev | title | weight | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
2013-07-01 |
|
/tutorials/automated-deployments | /community/press | Contributing to Hugo | 30 |
All contributions to Hugo are welcome. Whether you want to scratch an itch, or simply contribute to the project, feel free to pick something from the roadmap or contact spf13 about what may make sense to do next.
You should fork the project and make your changes. We encourage pull requests to discuss code changes.
When you're ready to create a pull request, be sure to:
- Have test cases for the new code. If you have questions about how to do it, please ask in your pull request.
- Run
go fmt
- Squash your commits into a single commit.
git rebase -i
. It's okay to force update your pull request. - Make sure
go test ./...
passes, andgo build
completes. Our Travis CI loop will catch most things that are missing. The exception: Windows. We run on Windows from time to time, but if you have access, please check on a Windows machine too.
Contribution Overview
- Fork Hugo from https://github.com/spf13/hugo
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Commit passing tests to validate changes.
- Run
go fmt
- Squash commits into a single (or logically grouped) commits (
git rebase -i
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Building from source
Clone locally (for contributors):
git clone https://github.com/spf13/hugo
cd hugo
go get
Because Go expects all of your libraries to be found in either
$GOROOT
or $GOPATH
, it's helpful to symlink the project to one
of the following paths:
ln -s /path/to/your/hugo $GOPATH/src/github.com/spf13/hugo
ln -s /path/to/your/hugo $GOROOT/src/pkg/github.com/spf13/hugo
Running Hugo
cd /path/to/hugo
go install github.com/spf13/hugo/hugo
go run main.go
Building Hugo
cd /path/to/hugo
go build -o hugo main.go
mv hugo /usr/local/bin/