Local

Put plugins as .rb files in your _plugins directory.

Guides:

External

If you are building on GitHub Pages, then in addition to a Gemfile you must add plugins to your _config.yml file as such:

plugins:
  - jekyll-feed
  - jekyll-sitemap

Additional plugins:

plugins:
  # ...
  - github-pages
  - jekyll-github-metadata

Submodule

See more info in the Git Submodules section.

Add the submodule.

$ git submodule add git://github.com/foo/bar.git _plugins/foo

Update for the latest content.

$ git submodule update --rebase --remote