Commit 08d21149 authored by Cédric Boutillier's avatar Cédric Boutillier

Imported Upstream version 3.2.1+dfsg

parent c7391503
engines:
rubocop: { enabled: true }
fixme: { enabled: false }
fixme:
enabled: false
rubocop:
enabled: true
exclude_paths:
- .rubocop.yml
- .codeclimate.yml
- .travis.yml
- .gitignore
- .rspec
- .codeclimate.yml
- .gitignore
- .rspec
- .rubocop.yml
- .travis.yml
- Gemfile.lock
- CHANGELOG.{md,markdown,txt,textile}
- CONTRIBUTING.{md,markdown,txt,textile}
- readme.{md,markdown,txt,textile}
- README.{md,markdown,txt,textile}
- Readme.{md,markdown,txt,textile}
- ReadMe.{md,markdown,txt,textile}
- COPYING
- LICENSE
- Gemfile.lock
- CHANGELOG.{md,markdown,txt,textile}
- CONTRIBUTING.{md,markdown,txt,textile}
- readme.{md,markdown,txt,textile}
- README.{md,markdown,txt,textile}
- Readme.{md,markdown,txt,textile}
- ReadMe.{md,markdown,txt,textile}
- COPYING
- LICENSE
- features/**/*
- script/**/*
- site/**/*
- spec/**/*
- test/**/*
- vendor/**/*
- site/**/*
- test/**/*
- vendor/**/*
- features/**/*
- script/**/*
- spec/**/*
ratings:
paths:
- lib/**/*.rb
- lib/**/*.rb
# Contributing to Jekyll
Hi there! Interested in contributing to Jekyll? We'd love your help. Jekyll is an open source project, built one contribution at a time by users like you.
## Where to get help or report a problem
* If you have a question about using Jekyll, start a discussion on [Jekyll Talk](https://talk.jekyllrb.com).
* If you think you've found a bug within a Jekyll plugin, open an issue in that plugin's repository.
* If you think you've found a bug within Jekyll itself, [open an issue](https://github.com/jekyll/jekyll/issues/new).
* More resources are listed on our [Help page](https://jekyllrb.com/help/).
## Ways to contribute
Whether you're a developer, a designer, or just a Jekyll devotee, there are lots of ways to contribute. Here's a few ideas:
* [Install Jekyll on your computer](https://jekyllrb.com/docs/installation/) and kick the tires. Does it work? Does it do what you'd expect? If not, [open an issue](https://github.com/jekyll/jekyll/issues/new) and let us know.
* Comment on some of the project's [open issues](https://github.com/jekyll/jekyll/issues). Have you experienced the same problem? Know a work around? Do you have a suggestion for how the feature could be better?
* Read through [the documentation](https://jekyllrb.com/docs/home/), and click the "improve this page" button, any time you see something confusing, or have a suggestion for something that could be improved.
* Browse through [the Jekyll discussion forum](https://talk.jekyllrb.com/), and lend a hand answering questions. There's a good chance you've already experienced what another user is experiencing.
* Find [an open issue](https://github.com/jekyll/jekyll/issues) (especially [those labeled `help-wanted`](https://github.com/jekyll/jekyll/issues?q=is%3Aopen+is%3Aissue+label%3Ahelp-wanted)), and submit a proposed fix. If it's your first pull request, we promise we won't bite, and are glad to answer any questions.
* Help evaluate [open pull requests](https://github.com/jekyll/jekyll/pulls), by testing the changes locally and reviewing what's proposed.
## Submitting a pull request
### Pull requests generally
* The smaller the proposed change, the better. If you'd like to propose two unrelated changes, submit two pull requests.
* The more information, the better. Make judicious use of the pull request body. Describe what changes were made, why you made them, and what impact they will have for users.
* Pull request are easy and fun. If this is your first pull request, it may help to [understand GitHub Flow](https://guides.github.com/introduction/flow/).
* If you're submitting a code contribution, be sure to read the [code contributions](#code-contributions) section below.
### Submitting a pull request via github.com
Many small changes can be made entirely through the github.com web interface.
1. Navigate to the file within [`jekyll/jekyll`](https://github.com/jekyll/jekyll) that you'd like to edit.
2. Click the pencil icon in the top right corner to edit the file
3. Make your proposed changes
4. Click "Propose file change"
5. Click "Create pull request"
6. Add a descriptive title and detailed description for your proposed change. The more information the better.
7. Click "Create pull request"
That's it! You'll be automatically subscribed to receive updates as others review your proposed change and provide feedback.
### Submitting a pull request via Git command line
1. Fork the project by clicking "Fork" in the top right corner of [`jekyll/jekyll`](https://github.com/jekyll/jekyll).
2. Clone the repository locally `git clone https://github.com/<you-username>/jekyll`.
3. Create a new, descriptively named branch to contain your change ( `git checkout -b my-awesome-feature` ).
4. Hack away, add tests. Not necessarily in that order.
5. Make sure everything still passes by running `script/cibuild` (see [the tests section](#running-tests-locally) below)
6. Push the branch up ( `git push origin my-awesome-feature` ).
7. Create a pull request by visiting `https://github.com/<your-username>/jekyll` and following the instructions at the top of the screen.
## Proposing updates to the documentation
We want the Jekyll documentation to be the best it can be. We've open-sourced our docs and we welcome any pull requests if you find it lacking.
### How to submit changes
You can find the documentation for jekyllrb.com in the [site](https://github.com/jekyll/jekyll/tree/master/site) directory. See the section above, [submitting a pull request](#submitting-a-pull-request) for information on how to propose a change.
One gotcha, all pull requests should be directed at the `master` branch (the default branch).
### Adding plugins
If you want to add your plugin to the [list of plugins](https://jekyllrb.com/docs/plugins/#available-plugins), please submit a pull request modifying the [plugins page source file](https://github.com/jekyll/jekyll/blob/master/site/_docs/plugins.md) by adding a link to your plugin under the proper subheading depending upon its type.
## Code Contributions
Interesting in submitting a pull request? Awesome. Read on. There's a few common gotchas that we'd love to help you avoid.
### Tests and documentation
Any time you propose a code change, you should also include updates to the documentation and tests within the same pull request.
#### Documentation
If your contribution changes any Jekyll behavior, make sure to update the documentation. Documentation lives in the `site/_docs` folder (spoiler alert: it's a Jekyll site!). If the docs are missing information, please feel free to add it in. Great docs make a great project. Include changes to the documentation within your pull request, and once merged, `jekyllrb.com` will be updated.
#### Tests
* If you're creating a small fix or patch to an existing feature, a simple test is more than enough. You can usually copy/paste from an existing example in the `tests` folder, but if you need you can find out about our tests suites [Shoulda](https://github.com/thoughtbot/shoulda/tree/master) and [RSpec-Mocks](https://github.com/rspec/rspec-mocks).
* If it's a brand new feature, create a new [Cucumber](https://github.com/cucumber/cucumber/) feature, reusing existing steps where appropriate.
### Code contributions generally
* Jekyll uses the [Rubocop](https://github.com/bbatsov/rubocop) static analyzer to ensure that contributions follow the [GitHub Ruby Styleguide](https://github.com/styleguide/ruby). Please check your code using `script/fmt` and resolve any errors before pushing your branch.
* Don't bump the Gem version in your pull request (if you don't know what that means, you probably didn't).
## Running tests locally
### Test Dependencies
To run the test suite and build the gem you'll need to install Jekyll's dependencies by running the following command:
<pre class="highlight"><code>$ script/bootstrap</code></pre>
Before you make any changes, run the tests and make sure that they pass (to confirm your environment is configured properly):
<pre class="highlight"><code>$ script/cibuild</code></pre>
If you are only updating a file in `test/`, you can use the command:
<pre class="highlight"><code>$ script/test test/blah_test.rb</code></pre>
If you are only updating a `.feature` file, you can use the command:
<pre class="highlight"><code>$ script/cucumber features/blah.feature</code></pre>
Both `script/test` and `script/cucumber` can be run without arguments to
run its entire respective suite.
## A thank you
Thanks! Hacking on Jekyll should be fun. If you find any of this hard to figure out, let us know so we can improve our process or documentation!
<!--
Hi! Thanks for considering to file a bug with Jekyll. Please take the time to
answer the basic questions. You can convert `[ ]` into `[x]` to check boxes (or submit
and check.) If there is no need for certain fields like output and redirection, please delete
those headers before submitting. We know not all tickets require those steps.
Otherwise, please try to be as detailed as possible.
If you are unsure this is a bug in Jekyll, or this is a bug caused
by a plugin that isn't directly related to Jekyll, or if this is just
a generic usage question, please consider asking your question at
https://talk.jekyllrb.com where non-bug questions go.
Thanks!
-->
- [ ] I believe this to be a bug, not a question about using Jekyll.
- [ ] I Updated to the latest Jekyll (or) if on Github Pages to the latest `github-pages`
- [ ] I Read the CONTRIBUTION file at https://jekyllrb.com/docs/contributing/
- [ ] This is a feature request.
---
- [ ] I am on (or have tested on) ***macOS*** 10+
- [ ] I am on (or have tested on) ***Debian/Ubuntu*** GNU/Linux
- [ ] I am on (or have tested on) ***Fedora*** GNU/Linux
- [ ] I am on (or have tested on) ***Arch*** GNU/Linux
- [ ] I am on (or have tested on) ***Other*** GNU/Linux
- [ ] I am on (or have tested on) ***Windows*** 10+
<!--
Other GNU/Linux includes Scientific GNU/Linux, CentOS GNU/Linux, and others.
If you are on a minor sub-distro (such as ElementaryOS which does not diverge from
Ubuntu much, please check the parent distro. Kubuntu, Edubuntu, Lubuntu should
also be flagged as Ubuntu as their packages come from upstream Ubuntu.
-->
---
- [ ] I was trying to install.
- [ ] There is a broken Plugin API.
- [ ] I had an error on Github Pages, and I have not tested locally.
- [ ] I had an error on Github Pages, and Github Support said it was a Jekyll Bug.
- [ ] I had an error on Github Pages and I did not test it locally.
- [ ] I was trying to build.
- [ ] It was another bug.
## My Reproduction Steps
<!--
If this error occured on Github Pages, please try to provide us with logs,
and look at them yourself, to determine if this is an actual Jekyll bug. In
the event you are unsure, file a ticket, however, when you do please provide
the logs (strip them of personal information.)
If you have trouble finding your logs, please email support@github.com and
they will happily help you. If you cannot find logs, please try your best to
replicate it locally because we cannot fix a problem if we do not know
exactly what caused it, or within a relatively close distance.
-->
<!--
Insert the steps you took to for this problem to exist. Such as the
directories you created and, the full command you ran, and include any
plugins you have installed, this is very important.
If your steps are complicated, you can also submit a Github
repository (please no zips, they will be removed and rejected by maintainers,)
and just supply a command for us to reproduce it ourselves.
-->
## The Output I Wanted
<!--
Insert the output from the command. Alter it as little as you can.
The minimum should be personal information. Though we normally don't log
anything like that so there should be no need to alter it.
-->
......@@ -13,6 +13,7 @@
/vendor
Gemfile.lock
_site/
bin/
bbin/
coverage
gh-pages/
......
Metrics/MethodLength: { Max: 24 }
Metrics/ClassLength: { Max: 240 }
Metrics/ModuleLength: { Max: 240 }
Metrics/LineLength: { Max: 112 }
Metrics/CyclomaticComplexity: { Max: 8 }
Metrics/PerceivedComplexity: { Max: 8 }
Metrics/ParameterLists: { Max: 4 }
Metrics/MethodLength: { Max: 24 }
Metrics/AbcSize: { Max: 20 }
Style/IndentHash: { EnforcedStyle: consistent }
Style/HashSyntax: { EnforcedStyle: hash_rockets }
Style/SignalException: { EnforcedStyle: only_raise }
Style/AlignParameters: { EnforcedStyle: with_fixed_indentation }
Style/StringLiteralsInInterpolation: { EnforcedStyle: double_quotes }
Style/MultilineMethodCallIndentation: { EnforcedStyle: indented }
Style/MultilineOperationIndentation: { EnforcedStyle: indented }
Style/FirstParameterIndentation: { EnforcedStyle: consistent }
Style/StringLiterals: { EnforcedStyle: double_quotes }
Style/RegexpLiteral: { EnforcedStyle: slashes }
Style/IndentArray: { EnforcedStyle: consistent }
Style/ExtraSpacing: { AllowForAlignment: true }
Style/PercentLiteralDelimiters:
PreferredDelimiters:
'%q': '{}'
'%Q': '{}'
'%r': '!!'
'%s': '()'
'%w': '()'
'%W': '()'
'%x': '()'
Style/AlignArray: { Enabled: false }
Style/StringLiterals: { Enabled: false }
Style/Documentation: { Enabled: false }
Style/DoubleNegation: { Enabled: false }
Style/UnneededCapitalW: { Enabled: false }
Style/EmptyLinesAroundModuleBody: { Enabled: false }
Style/EmptyLinesAroundAccessModifier: { Enabled: false }
Style/BracesAroundHashParameters: { Enabled: false }
Style/SpaceInsideBrackets: { Enabled: false }
Style/IfUnlessModifier: { Enabled: false }
Style/ModuleFunction: { Enabled: false }
Style/RescueModifier: { Enabled: false }
Style/GuardClause: { Enabled: false }
Style/FileName: { Enabled: false }
Lint/UselessAccessModifier: { Enabled: false }
Style/SpaceAroundOperators: { Enabled: false }
Style/RedundantReturn: { Enabled: false }
Style/SingleLineMethods: { Enabled: false }
---
AllCops:
TargetRubyVersion: 2.0
Include:
- lib/**/*.rb
- lib/**/*.rb
Exclude:
- lib/jekyll/convertible.rb
- lib/jekyll/document.rb
- lib/jekyll/renderer.rb
- bin/**/*
- benchmark/**/*
- script/**/*
- vendor/**/*
Lint/EndAlignment:
Severity: error
Lint/UnreachableCode:
Severity: error
Lint/UselessAccessModifier:
Enabled: false
Metrics/AbcSize:
Max: 20
Metrics/ClassLength:
Exclude:
- !ruby/regexp /features\/.*.rb$/
- !ruby/regexp /test\/.*.rb$/
Max: 300
Metrics/CyclomaticComplexity:
Max: 8
Metrics/LineLength:
Exclude:
- .rubocop.yml
- .codeclimate.yml
- .travis.yml
- .gitignore
- .rspec
- Gemfile.lock
- CHANGELOG.{md,markdown,txt,textile}
- CONTRIBUTING.{md,markdown,txt,textile}
- readme.{md,markdown,txt,textile}
- README.{md,markdown,txt,textile}
- Readme.{md,markdown,txt,textile}
- ReadMe.{md,markdown,txt,textile}
- COPYING
- LICENSE
- site/**/*
- test/**/*
- vendor/**/*
- features/**/*
- script/**/*
- spec/**/*
- !ruby/regexp /features\/.*.rb/
Max: 90
Severity: warning
Metrics/MethodLength:
CountComments: false
Max: 20
Severity: error
Metrics/ModuleLength:
Max: 240
Metrics/ParameterLists:
Max: 4
Metrics/PerceivedComplexity:
Max: 8
Style/Alias:
Enabled: false
Style/AlignArray:
Enabled: false
Style/AlignHash:
EnforcedHashRocketStyle: table
Style/AlignParameters:
Enabled: false
EnforcedStyle: with_fixed_indentation
Style/AndOr:
Severity: error
Style/Attr:
Enabled: false
Style/BracesAroundHashParameters:
Enabled: false
Style/ClassAndModuleChildren:
Enabled: false
Style/Documentation:
Enabled: false
Exclude:
- !ruby/regexp /features\/.*.rb$/
Style/DoubleNegation:
Enabled: false
Style/EmptyLinesAroundAccessModifier:
Enabled: false
Style/EmptyLinesAroundModuleBody:
Enabled: false
Style/ExtraSpacing:
AllowForAlignment: true
Style/FileName:
Enabled: false
Style/FirstParameterIndentation:
EnforcedStyle: consistent
Style/GuardClause:
Enabled: false
Style/HashSyntax:
EnforcedStyle: hash_rockets
Severity: error
Style/IfUnlessModifier:
Enabled: false
Style/IndentArray:
EnforcedStyle: consistent
Style/IndentHash:
EnforcedStyle: consistent
Style/IndentationWidth:
Severity: error
Style/ModuleFunction:
Enabled: false
Style/MultilineMethodCallIndentation:
EnforcedStyle: indented
Style/MultilineOperationIndentation:
EnforcedStyle: indented
Style/MultilineTernaryOperator:
Severity: error
Style/PercentLiteralDelimiters:
PreferredDelimiters:
"%q": "{}"
"%Q": "{}"
"%r": "!!"
"%s": "()"
"%w": "()"
"%W": "()"
"%x": "()"
Style/RedundantReturn:
Enabled: false
Style/RedundantSelf:
Enabled: false
Style/RegexpLiteral:
EnforcedStyle: percent_r
Style/RescueModifier:
Enabled: false
Style/SignalException:
EnforcedStyle: only_raise
Style/SingleLineMethods:
Enabled: false
Style/SpaceAroundOperators:
Enabled: false
Style/SpaceInsideBrackets:
Enabled: false
Style/StringLiterals:
EnforcedStyle: double_quotes
Style/StringLiteralsInInterpolation:
EnforcedStyle: double_quotes
Style/UnneededCapitalW:
Enabled: false
before_script: bundle update
bundler_args: --without benchmark:site:development
script: script/cibuild
cache: bundler
......@@ -9,25 +8,25 @@ rvm:
- &ruby1 2.3.0
- &ruby2 2.2.4
- &ruby3 2.1.8
- &ruby4 2.0.0-p648
- &jruby jruby-9.0.4.0
- &rhead ruby-head
matrix:
fast_finish: true
allow_failures:
- rvm: *jruby
- rvm: *rhead
include:
- rvm: 2.3.0
env: TEST_SUITE=fmt
- rvm: jruby-9.0.5.0
env: TEST_SUITE=test
- rvm: 2.3.0
env: TEST_SUITE=default-site
env:
matrix:
- TEST_SUITE=test
- TEST_SUITE=cucumber
branches:
only:
- master
- themes
notifications:
irc:
template: "%{repository}#%{build_number} (%{branch}) %{message} %{build_url}"
channels: irc.freenode.org#jekyll
email:
recipients:
- jordon@envygeeks.io
......
# Contributor Code of Conduct
# Code of Conduct
As contributors and maintainers of this project, and in the interest of
fostering an open and welcoming community, we pledge to respect all people who
......
Contribute
==========
So you've got an awesome idea to throw into Jekyll. Great! Please keep the
following in mind:
* **Use https://talk.jekyllrb.com for non-technical or indirect Jekyll questions that are not bugs.**
* **Contributions will not be accepted without tests or necessary documentation updates.**
* If you're creating a small fix or patch to an existing feature, just a simple
test will do. Please stay in the confines of the current test suite and use
[Shoulda](https://github.com/thoughtbot/shoulda/tree/master) and
[RSpec-Mocks](https://github.com/rspec/rspec-mocks).
* If it's a brand new feature, make sure to create a new
[Cucumber](https://github.com/cucumber/cucumber/) feature and reuse steps
where appropriate. Also, whipping up some documentation in your fork's `site`
would be appreciated, and once merged it will be transferred over to the main
`site`, jekyllrb.com.
* If your contribution changes any Jekyll behavior, make sure to update the
documentation. It lives in `site/_docs`. If the docs are missing information,
please feel free to add it in. Great docs make a great project!
* Please follow the [GitHub Ruby Styleguide](https://github.com/styleguide/ruby)
when modifying Ruby code.
* Please do your best to submit **small pull requests**. The easier the proposed
change is to review, the more likely it will be merged.
* When submitting a pull request, please make judicious use of the pull request
body. A description of what changes were made, the motivations behind the
changes and [any tasks completed or left to complete](http://git.io/gfm-tasks)
will also speed up review time.
Test Dependencies
-----------------
To run the test suite and build the gem you'll need to install Jekyll's
dependencies. Simply run this command to get all setup:
$ script/bootstrap
Before you start, run the tests and make sure that they pass (to confirm your
environment is configured properly):
$ script/cibuild
If you are only updating a file in `test/`, you can use the command:
$ script/test test/blah_test.rb
If you are only updating a `.feature` file, you can use the command:
$ script/cucumber features/blah.feature
Both `script/test` and `script/cucumber` can be run without arguments to
run its entire respective suite.
Workflow
--------
Here's the most direct way to get your work merged into the project:
* Fork the project.
* Clone down your fork ( `git clone git@github.com:[username]/jekyll.git` ).
* Create a topic branch to contain your change ( `git checkout -b my_awesome_feature` ).
* Hack away, add tests. Not necessarily in that order.
* Make sure everything still passes by running `script/cibuild`.
* If necessary, rebase your commits into logical chunks, without errors.
* Push the branch up ( `git push origin my_awesome_feature` ).
* Create a pull request against jekyll/jekyll and describe what your change
does and the why you think it should be merged.
Updating Documentation
----------------------
We want the Jekyll documentation to be the best it can be. We've
open-sourced our docs and we welcome any pull requests if you find it
lacking.
You can find the documentation for jekyllrb.com in the
[site](https://github.com/jekyll/jekyll/tree/master/site) directory of
Jekyll's repo on GitHub.com.
All documentation pull requests should be directed at `master`. Pull
requests directed at another branch will not be accepted.
The [Jekyll wiki](https://github.com/jekyll/jekyll/wiki) on GitHub
can be freely updated without a pull request as all GitHub users have access.
If you want to add your plugin to the
[list of plugins](http://jekyllrb.com/docs/plugins/#available-plugins),
please submit a pull request modifying the
[plugins page source file](site/_docs/plugins.md) by adding a
link to your plugin under the proper subheading depending upon its type.
Gotchas
-------
* Please do not bump the gem version in your pull requests.
* Try to keep your patch(es) based from the latest commit on jekyll/jekyll.
The easier it is to apply your work, the less work the maintainers have to do,
which is always a good thing.
* Please don't tag your GitHub issue with [fix], [feature], etc. The maintainers
actively read the issues and will label it once they come across it.
Finally...
----------
Thanks! Hacking on Jekyll should be fun. If you find any of this hard to figure
out, let us know so we can improve our process or documentation!
source "https://rubygems.org"
gemspec :name => "jekyll"
gem "rake", "~> 10.1"
gem "rake", "~> 11.0"
# Dependency of jekyll-mentions. RubyGems in Ruby 2.1 doesn't shield us from this.
gem "activesupport", "~> 4.2", :groups => [:test_legacy, :site] if RUBY_VERSION < '2.2.2'
group :development do
gem "launchy", "~> 2.3"
gem "rubocop", "~> 0.40"
gem "pry"
unless RUBY_ENGINE == "jruby"
......@@ -15,6 +18,7 @@ end
#
group :test do
gem "rubocop"
gem "cucumber", "~> 2.1"
gem "jekyll_test_plugin"