The 'gems' configuration option has been renamed to 'plugins'.?
Asked Answered
H

2

9

When I use the latest jekyll and start its server, a certain warning below shows up:

$ jekyll serve Configuration file: /Users/ishida/git/gipcompany.github.io/_config.yml Deprecation: The 'gems' configuration option has been renamed to 'plugins'. Please update your config file accordingly.

I guess the following gems should be replaced with plugins, and then the warning won't show up, but I couldn't find any official documentation. Is my guess correct?

$ cat _config.yml
(omit)
gems:
  - jekyll-feed
Herrah answered 15/7, 2017 at 20:16 Comment(0)
N
7

Your guess is correct, gems key is now plugins.

In jekyll/lib/jekyll/configuration.rb you can find:

def backwards_compatibilize
   ...
   renamed_key "gems", "plugins", config

It is part of this Pull Request: plugins config key as replacement for gems (#5130)

And it was the result of this issue:

What do you think about renaming the gems config directive to plugins, with full backwards compatibility?

The idea being, if you're not from the Ruby world, "gems" isn't a very intuitive term (even though that's what they are). Further, users shouldn't have to care about (or see) the behind-the-scenes plumbing, in terms of how things are distributed.

Instead, let's call the key "plugins", a term which has a broader understanding outside the Ruby ecosystem, and one that should be familiar to any user coming from a more traditional CMS like WordPress or Drupal.

In terms of practicality, it'd just be a matter of combining the gems and plugins arrays, if they exist when we load the config, and updating the docs in the next minor release.

Novak answered 15/7, 2017 at 20:31 Comment(0)
T
1

You're right, in order to fix that, follow these steps:

  1. Open your _config.yml file
  2. Find the line beginning with gems:
  3. Replace gems with plugins
Tevet answered 31/5, 2020 at 14:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.