'gems' 配置选项已重命名为 'plugins'。?

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

当我使用最新的 jekyll 并启动其服务器时,会出现以下警告:

$ 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.

我猜下面的gems应该换成plugins,这样warning就不会出现了,但是我没找到官方文档。我的猜测是否正确?

$ cat _config.yml
(omit)
gems:
  - jekyll-feed

您的猜测是正确的,gems 密钥现在是 plugins

jekyll/lib/jekyll/configuration.rb中您可以找到:

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

它是 this Pull Request 的一部分:插件配置密钥作为 gem 的替代品 (#5130)

这是 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.

你说得对,要解决这个问题,请按照以下步骤操作:

  1. 打开您的 _config.yml 文件
  2. 找到以gems:
  3. 开头的行
  4. gems替换为plugins