shithub: hugo

Download patch

ref: be1b7f67d3f02fe9d100f31b61c5222220e4dccb
parent: be2097e1ad789eca5d893805a059d94defbe5c48
author: bep <[email protected]>
date: Mon Apr 6 11:11:48 EDT 2015

Add git commit message guideline

Also rearranged the contribution section to get more attention to the important stuff.

--- a/README.md
+++ b/README.md
@@ -90,11 +90,19 @@
 
 If you have any questions about how to contribute or what to contribute please ask on the [forum](http://discuss.gohugo.io)
 
+## Code Contribution Guideline
 
-## Code Contribution Guide
+We welcome your contributions. To make the process as seamless as possible, we ask for the following:
 
-Contributors should build Hugo and test their changes before submitting a code change.
+* Go ahead and 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.
+     * This [blog article](http://chris.beams.io/posts/git-commit/) is a good resource for learning how to write good commit messages, the most important part being that each commit message should have a title/subject in imperative mode without trailing period: *"Return error on wrong use of the Paginator"*, **NOT** *"Returning some error."* Also, if your commit references one or more GitHub issues, always end your commit message body with *See #1234* or *Fixes #1234*. Replace *1234* with the GitHub issue ID. The last example will close the issue when the commit is merged into *master*.
+     * Make sure `go test ./...` passes, and `go build` completes. Our [Travis CI loop](https://travis-ci.org/spf13/hugo) 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.
 
+
 ### Building Hugo with Your Changes
 
     cd /path/to/hugo
@@ -136,17 +144,6 @@
     cd /path/to/hugo
     go install github.com/spf13/hugo/hugolib
     go run main.go
-
-## Contribution Guidelines
-
-We welcome your contributions. To make the process as seamless as possible, we ask for the following:
-
-* Go ahead and 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, and `go build` completes. Our [Travis CI loop](https://travis-ci.org/spf13/hugo) 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.
 
 **Complete documentation is available at [Hugo Documentation](http://gohugo.io/).**