Merge pull request #1656 from mojombo/plugin-gems-docs

Add docs for new 'gems' option.
This commit is contained in:
Matt Rogers 2013-10-23 20:35:56 -07:00
commit 2d7a4c69ec
2 changed files with 24 additions and 5 deletions

View File

@ -281,6 +281,7 @@ layouts: ./_layouts
include: ['.htaccess']
exclude: []
keep_files: ['.git','.svn']
gems: []
timezone: nil
encoding: nil

View File

@ -25,9 +25,27 @@ having to modify the Jekyll source itself.
## Installing a plugin
In your site source root, make a `_plugins` directory. Place your plugins here.
You have 2 options for installing plugins:
1. In your site source root, make a `_plugins` directory. Place your plugins here.
Any file ending in `*.rb` inside this directory will be loaded before Jekyll
generates your site.
2. In your `_config.yml` file, add a new array with the key `gems` and the values
of the gem names of the plugins you'd like to use. An example:
gems: [jekyll-test-plugin, jekyll-jsonify, jekyll-assets]
# This will require each of these gems automatically.
<div class="note info">
<h5>
<code>_plugins</code> and <code>gems</code>
can be used simultaneously
</h5>
<p>
You may use both of the aforementioned plugin options simultaneously in the
same site if you so choose. Use of one does not restrict the use of the other
</p>
</div>
In general, plugins you make will fall into one of three categories: