- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
gem "jekyll-remote-theme"
bundle exec jekyll serve
gem "jekyll-remote-theme"
在本地机器上查看由 Jekyll 制作的页面。我正在尝试使用 Jekyll 和 Minimal Mistakes 在 GitHub Pages 中构建博客。在推送更改之前,我想检查页面是否一切正常。
bundle exec jekyll new . --force
bundle exec jekyll serve
我有一个与 libcurl.dll
相关的错误。这是 Powershell 上的消息。
Dependency Error: Yikes! It looks like you don't have jekyll-remote-theme or o ne of its dependencies installed. In order to use Jekyll as currently configured , you'll need to install this gem. The full error message from Ruby is: 'Could n ot open library 'libcurl': (illegal characters) . Could not open libr ary 'libcurl.dll': (illegal characters) . Could not open library 'lib curl.so.4': (illegal characters) . Could not open library 'libcurl.so .4.dll': (illegal characters) ' If you run into trouble, you can find helpful resources at https://jekyllrb.com/help/!
我按照 GitHub Pages Dependencies Missing · Issue #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.
看起来 jekyll
无法读取布局文件。此外,_layouts
目录不在我执行 bundle exec jekyll new
的目录中。但默认情况下,what's in the _layouts
directory is packaged in a theme所以看不到目录是正常的。所以我只是从 minimal-mistakes GitHub repo 复制了 _layouts
到本地目录作为解决方法。
然后,出现了另一个错误。
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.
我本可以用同样的方式复制 _includes
但我相信问题的核心在于 jekyll
未能从中读取必要的文件,例如, GitHub 存储库。
奇怪的是,当我将本地更改推送到 GitHub 时,GitHub Pages 显示正确呈现的页面,如下所示。
顺便说一下,repo 是 https://github.com/Dixhom/dixhom.github.io/tree/7132905f5515345eb78cd71bdad168a15f906a1c
我怀疑 jekyll-remote-theme
在本地环境中不起作用,所以我用谷歌搜索“jekyll remote theme serve”,但没有帮助。
谷歌搜索关键字,如“远程主题构建警告:布局不存在”。没有太大帮助。
我该如何解决这个问题?
最佳答案
aaaah 我也很反对这个。我跑了 bundle exec jekyll serve --verbose
看到了 jekyll-remote-theme
根本没有被初始化(每个插件记录一个 Requiring: jekyll-<thing>
行)。然后我注意到 Gemfile 中的这个 block :
# If you have any plugins, put them here!
group :jekyll_plugins do
gem "jekyll-feed", "~> 0.6"
end
我添加了 "gem jekyll-remote-theme"
到那个插件 block 并修复它 - doh!
jekyll 变更日志中有一些关于这个 Gemfile 组的注释,但我没有发现任何注释对解释这里发生的事情有很大帮助。
希望对您有所帮助!
关于ruby - Jekyll 远程主题在本地不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48728510/
今天有小伙伴给我留言问到,try{...}catch(){...}是什么意思?它用来干什么? 简单的说 他们是用来捕获异常的 下面我们通过一个例子来详细讲解下
我正在努力提高网站的可访问性,但我不知道如何在页脚中标记社交媒体链接列表。这些链接指向我在 facecook、twitter 等上的帐户。我不想用 role="navigation" 标记这些链接,因
说现在是 6 点,我有一个 Timer 并在 10 点安排了一个 TimerTask。之后,System DateTime 被其他服务(例如 ntp)调整为 9 点钟。我仍然希望我的 TimerTas
就目前而言,这个问题不适合我们的问答形式。我们希望答案得到事实、引用资料或专业知识的支持,但这个问题可能会引发辩论、争论、投票或扩展讨论。如果您觉得这个问题可以改进并可能重新打开,visit the
我就废话不多说了,大家还是直接看代码吧~ ? 1
Maven系列1 1.什么是Maven? Maven是一个项目管理工具,它包含了一个对象模型。一组标准集合,一个依赖管理系统。和用来运行定义在生命周期阶段中插件目标和逻辑。 核心功能 Mav
我是一名优秀的程序员,十分优秀!