gpt4 book ai didi

ruby - 'gems' 配置选项已重命名为 'plugins' .?

转载 作者:行者123 更新时间:2023-12-04 03:02:33 26 4
gpt4 key购买 nike

当我使用最新的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 ,然后警告不会出现,但我找不到任何官方文档。我的猜测正确吗?
$ 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 的一部分: 插件配置键作为 gems 的替代品 (#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.

关于ruby - 'gems' 配置选项已重命名为 'plugins' .?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45122373/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com