【发布时间】:2014-10-08 15:09:59
【问题描述】:
我的目标是使用 Jekyll + Github Pages 建立一个网站。我已经遇到了麻烦,我必须将我的 Mac 从 Mountain Lion 升级到 Mavericks,这样我才能安装 Xcode 和 RedCloth。
我正在尝试使用Github Pages's official documentation,但如上所述,它遇到了麻烦。我正处于我试图奔跑的地步 bundle exec jekyll serve
但我收到了错误,指出没有这样的日期:
ERROR: YOUR SITE COULD NOT BE BUILT:
------------------------------------
Invalid date '0000-00-00': Post '/vendor/bundle/ruby/2.0.0/gems/jekyll- 2.4.0/lib/site_template/_posts/0000-00-00-welcome-to-jekyll.markdown.erb' does not have a valid date in the filename.
所以我进去输入今天的日期。下一个错误是
ERROR: YOUR SITE COULD NOT BE BUILT:
------------------------------------
Invalid date '<%= Time.now.strftime('%Y-%m-%d %H:%M:%S') %>': Post '/vendor/bundle/ruby/2.0.0/gems/jekyll-2.4.0/lib/site_template/_posts/2014-10-08-welcome-to-jekyll.markdown.erb' does not have a valid date in the YAML front matter.
所以我进入了welcome-to-jekyll 文件并输入了今天的日期和时间。
我尝试再次运行服务器。我现在无法解决的下一个问题是几个文件似乎丢失了:
Build Warning: Layout 'post' requested in vendor/bundle/ruby/2.0.0/gems/jekyll-2.4.0/lib/site_template/_posts/2014-10-08-welcome-to-jekyll.markdown.erb does not exist.
Build Warning: Layout 'page' requested in vendor/bundle/ruby/2.0.0/gems/jekyll-2.4.0/lib/site_template/about.md does not exist.
Build Warning: Layout 'default' requested in vendor/bundle/ruby/2.0.0/gems/jekyll-2.4.0/lib/site_template/index.html does not exist.
Conversion error: Jekyll::Converters::Scss encountered an error converting 'vendor/bundle/ruby/2.0.0/gems/jekyll-2.4.0/lib/site_template/css/main.scss'.
谷歌搜索这个问题没有带来任何答案。据我了解,这应该是一个直截了当的过程,但整个过程都是一场灾难!
【问题讨论】:
-
你的仓库的 url 可以提供帮助。
-
我更新了帖子。自从 Jekyll 失败后,里面什么都没有。
-
这与您的问题没有直接关系,只是为了将来参考 - 如果您在 Docker 映像中开发 Jekyll 博客,您会省去很多麻烦。通过这种方式,您不需要安装这么多依赖项,因为已经有一个 Jekyll Docker 映像。您只需要安装 Docker,这简直是小菜一碟。
标签: ruby github jekyll github-pages