Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Latest commit

 

History

History
50 lines (33 loc) · 3.16 KB

CONTRIBUTING.md

File metadata and controls

50 lines (33 loc) · 3.16 KB

Contributing to jekyll-netlify-redirects

I'd love to have your help improving jekyll-netlify-redirects! If you'd like to pitch in, you can do so in a number of ways:

  1. Look through open Issues.
  2. Review any open Pull Requests.
  3. Fork jekyll-netlify-redirects and fix an open Issue or add your own feature.
  4. File new Issues if you have a good idea or see a bug and don't know how to fix it yourself. Only do this after you've made sure the behavior or problem you're seeing isn't already documented in an open Issue.

I definitely appreciate your interest in (and help improving) jekyll-netlify-redirects. Thanks!

Installation

jekyll-netlify-redirects is written in Ruby (version 2.4.10) and development dependencies are managed using the Bundler gem.

I manage Ruby versions with rbenv. I'd recommend you do the same or use a similar Ruby version manager (chruby or RVM come to mind). Once you've installed Ruby 2.4.10 using your method of choice, install the project's gems by running:

bundle install

…from the root of the project.

Get set up to contribute

Contributing to jekyll-netlify-redirects is pretty straightforward:

  1. Fork the jekyll-netlify-redirects repo and clone it.
  2. Install development dependencies as outlined above.
  3. Create a feature branch for the issue or new feature you're looking to tackle: git checkout -b your-descriptive-branch-name.
  4. Write some code!
  5. Build (bin/rake build) and install (bin/rake install) your updated code.
  6. Commit your changes: git commit -am 'Add some new feature or fix some issue'.
  7. Push the branch to your fork of jekyll-netlify-redirects: git push origin your-descriptive-branch-name.
  8. Create a new Pull Request and I'll give it a look!

Code Style

Code styles are like opinions: Everyone's got one and yours is better than mine. Here's how jekyll-netlify-redirects should be written:

  • Use two-space indentation in Ruby.
  • No trailing whitespace and blank lines should have whitespace removed.
  • Prefer single quotes over double quotes unless interpolating.
  • Follow the conventions you see in the existing source code as best as you can.

jekyll-netlify-redirects's formatting guidelines are defined in the .editorconfig file which uses the EditorConfig syntax. There are a number of great plugins for a variety of editors that utilize the settings in the .editorconfig file. EditorConfig takes the hassle out of syntax-specific formatting.

Additionally, Rubocop can be used to help identify possible trouble areas in your code. Run bin/rubocop to generate Rubocop's static code analysis report.

Your bug fix or feature addition won't be rejected if it runs afoul of any (or all) of these guidelines, but following the guidelines will definitely make everyone's lives a little easier.