按照此处找到的 jekyll 文档进行操作:https://jekyllrb.com/docs/themes/ https://jekyllrb.com/docs/themes/我试图安装和更改基于 gem 的主题,因此我为此选择了 jekyll-theme-primer,并运行了以下命令并按照以下说明进行操作https://jekyllrb.com/docs/themes/#installing-a-theme https://jekyllrb.com/docs/themes/#installing-a-theme部分:
gem "jekyll-theme-primer"
并得到这个错误:
ERROR: While executing gem ... (Gem::CommandLineError)
Unknown command jekyll-theme-awesome
经过一些研究后,我发现我应该添加install我的查询如下所述:执行 gem 时,未知命令 https://stackoverflow.com/questions/10863576/while-executing-gem-unknown-command
运行后:
gem install "jekyll-theme-primer"
我成功安装了基于 gem 的底漆主题并得到了以下确认:
Successfully installed jekyll-theme-primer-0.5.2
Parsing documentation for jekyll-theme-primer-0.5.2
Done installing documentation for jekyll-theme-primer after 0 seconds
1 gem installed
第一个问题:官方文档是否不正确或者我遗漏了什么?
我继续运行捆绑安装命令:
bundle install
并通过添加/替换以下行,将 _config.yml 中的当前最小主题替换为 jekyll-theme-primer:
theme: jekyll-theme-primer
现在,当我尝试运行以下任一命令时:
jekyll serve
or the:
bundle exec jekyll serve
命令,我收到以下错误:
jekyll 3.5.2 | Error: The jekyll-theme-primer theme could not be found.
那么为什么安装成功却找不到gem主题呢?