You have 3 options for installing plugins:
In your site source root, make a
_pluginsdirectory. Place your plugins here. Any file ending in
*.rbinside this directory will be loaded before Jekyll generates your site.
_config.ymlfile, add a new array with the key
gemsfor Jekyll <
3.5.0) and the values of the gem names of the plugins you’d like to use. An example:
# This will require each of these plugins automatically. plugins: - jekyll-gist - jekyll-coffeescript - jekyll-assets - another-jekyll-plugin
Then install your plugins using
gem install jekyll-gist jekyll-coffeescript jekyll-assets another-jekyll-plugin
Add the relevant plugins to a Bundler group in your
Gemfile. An example:
group :jekyll_plugins do gem "jekyll-gist" gem "jekyll-coffeescript" gem "jekyll-assets" gem "another-jekyll-plugin" end
Now you need to install all plugins from your Bundler group by running single command
Plugins on GitHub Pages
GitHub Pages is powered by Jekyll.
However, all Pages sites are generated using the
to disable plugins (with the exception of some
whitelisted plugins) for
security reasons. Unfortunately, this means
your plugins won’t work if you’re deploying to GitHub Pages.
You can still use GitHub Pages to publish your site, but you’ll need to convert the site locally and push the generated static files to your GitHub repository instead of the Jekyll source files.
can be used simultaneously
You may use any of the aforementioned plugin options simultaneously in the same site if you so choose. Use of one does not restrict the use of the others.
The jekyll_plugins group
Jekyll gives this particular group of gems in your
Gemfile a different
treatment. Any gem included in this group is loaded before Jekyll starts
processing the rest of your source directory.
A gem included here will be activated even if its not explicitly listed under
plugins: key in your site’s config file.
Gems included in the
:jekyll-plugins group are activated
regardless of the
--safe mode setting. Be aware of what
gems are included under this group!