dix*_*hom 9 ruby windows github jekyll github-pages
gem "jekyll-remote-theme"
bundle exec jekyll serve
gem "jekyll-remote-theme"
.我正在尝试使用Jekyll和Minimal Mistakes在GitHub页面中构建一个博客.在我推动更改之前,我想检查页面是否一切正常.
bundle exec jekyll new . --force
bundle exec jekyll serve
我有一个与之相关的错误libcurl.dll
.以下是Powershell上的消息.
依赖性错误:哎呀!看起来您没有安装jekyll-remote-theme或其依赖项.为了使用当前配置的Jekyll,您需要安装此gem.来自Ruby的完整错误消息是:'无法打开库'libcurl':(非法字符).无法打开libr ary'libcurl.dll':(非法字符).无法打开库'lib curl.so.4':(非法字符).无法打开库'libcurl.so .4.dll':(非法字符)'如果遇到麻烦,可以在https://jekyllrb.com/help/找到有用的资源!
我按照GitHub页面依赖关系中的说明缺失·问题#17·benbalter/jekyll-remote-theme,问题解决了.
然后出现了另一个错误bundle exec jekyll serve
.本地创建的页面为空白.http://127.0.0.1:4000/什么也没说.
PS E:\workspace\mysite\dixhom.github.io> bundle exec jekyll serve
Configuration file: E:/workspace/mysite/dixhom.github.io/_config.yml
Source: E:/workspace/mysite/dixhom.github.io
Destination: E:/workspace/mysite/dixhom.github.io/_site
Incremental build: disabled. Enable with --incremental
Generating...
Remote Theme: Using theme mmistakes/minimal-mistakes
Build Warning: Layout 'single' requested in _posts/2018-02-06-welcome-to-jekyll.markdown does not exist.
Build Warning: Layout 'default' requested in 404.html does not exist.
Build Warning: Layout 'page' requested in about.md.bak does not exist.
Build Warning: Layout 'home' requested in index.html does not exist.
Build Warning: Layout 'home' requested in index.md.bak does not exist.
done in 5.423 seconds.
Auto-regeneration: enabled for 'E:/workspace/mysite/dixhom.github.io'
Server address: http://127.0.0.1:4000/
Server running... press ctrl-c to stop.
Run Code Online (Sandbox Code Playgroud)
它看起来像jekyll
无法读取布局文件.另外,_layouts
目录不在我所做的目录中bundle exec jekyll new
.但默认情况下,是什么在_layouts
目录被包装在一个主题所以这是正常的不是看目录.所以我只是_layouts
从最小错误GitHub repo复制到本地目录作为一种解决方法.
然后,又出现了另一个错误.
PS E:\workspace\mysite\dixhom.github.io> bundle exec jekyll serve
Configuration file: E:/workspace/mysite/dixhom.github.io/_config.yml
Source: E:/workspace/mysite/dixhom.github.io
Destination: E:/workspace/mysite/dixhom.github.io/_site
Incremental build: disabled. Enable with --incremental
Generating...
Remote Theme: Using theme mmistakes/minimal-mistakes
Liquid Exception: Could not locate the included file 'sidebar.html' in any of ["E:/workspace/mysite/dixhom.github.io/_
includes"]. Ensure it exists in one of those directories and, if it is a symlink, does not point outside your site sourc
e. in /_layouts/single.html
jekyll 3.6.2 | Error: Could not locate the included file 'sidebar.html' in any of ["E:/workspace/mysite/dixhom.github.i
o/_includes"]. Ensure it exists in one of those directories and, if it is a symlink, does not point outside your site so
urce.
Run Code Online (Sandbox Code Playgroud)
我本可以_includes
以同样的方式复制,但我相信问题的核心在于jekyll
无法从GitHub仓库中读取必要的文件.
奇怪的是当我将本地更改推送到GitHub时,GitHub Pages显示正确呈现的页面,如下所示.
顺便说一句,回购是https://github.com/Dixhom/dixhom.github.io/tree/7132905f5515345eb78cd71bdad168a15f906a1c
我怀疑jekyll-remote-theme
不能在当地的环境下工作所以我用Google搜索"jekyll远程主题服务",这是没有用的.
谷歌搜索关键字,如"远程主题生成警告:布局不存在".没多大帮助.
我怎么解决这个问题?
小智 10
啊啊啊我也只是在反对这个。我跑了bundle exec jekyll serve --verbose
,看到它jekyll-remote-theme
根本没有被初始化(每个插件都记录Requiring: jekyll-<thing>
一行)。然后我注意到 Gemfile 中的这个块:
# If you have any plugins, put them here!
group :jekyll_plugins do
gem "jekyll-feed", "~> 0.6"
end
Run Code Online (Sandbox Code Playgroud)
我添加"gem jekyll-remote-theme"
到那个插件块并修复了它 - 哦!
jekyll 更新日志中有一些关于这个 Gemfile 组的注释,但我没有发现其中的任何内容对解释这里发生的事情很有帮助。
希望有帮助!