jekyll/site/_posts/2012-07-01-contributing.md

2.8 KiB
Raw Blame History

layout title prev_section next_section
docs Contributing deployment-methods troubleshooting

Contributions to Jekyll are always welcome, however theres a few things that you should keep in mind to improve your chances of having your changes merged in.

Workflow

Heres the most typical way to get your change merged into the project:

  1. Fork the project on GitHub and clone it down to your local machine.
  2. Create a topic branch to contain your change.
  3. Hack away, add tests. Not necessarily in that order.
  4. Make sure all the existing tests still pass.
  5. If necessary, rebase your commits into logical chunks, without errors.
  6. Push the branch up to your fork on GitHub.
  7. Create an issue on GitHub with a link to your branch.
Contributions will not be accepted without tests

If youre creating a small fix or patch to an existing feature, just a simple test will do.

Tests

Were big on tests, so please be sure to include them. Please stay in the confines of the current test suite and use Shoulda and RR.

Tests for brand-new features

If its a brand new feature, make sure to create a new Cucumber feature and reuse steps where appropriate. Also, whipping up some documentation in your forks gh-pages branch would be appreciated, so the main website can be updated as soon as your new feature is merged.

Test dependencies

To run the test suite and build the gem youll need to install Jekylls dependencies. Jekyll uses Bundler, so a quick run of the bundle command and youre all set!

{% highlight bash %} $ bundle {% endhighlight %}

Before you start, run the tests and make sure that they pass (to confirm your environment is configured properly):

{% highlight bash %} $ rake test $ rake features {% endhighlight %}

Common Gotchas

  • If you want to bump the gem version, please put that in a separate commit. This way, the maintainers can control when the gem gets released.
  • Try to keep your patch(es) based from the latest commit on mojombo/jekyll. The easier it is to apply your work, the less work the maintainers have to do, which is always a good thing.
  • Please dont tag your GitHub issue with labels like “fix” or “feature”. The maintainers actively read the issues and will label it once they come across it.
Let us know what could be better!

Both using and hacking on Jekyll should be fun, simple, and easy, so if for some reason you find its a pain, please create an issue on GitHub describing your experience so we can make it better.