github jekyll无法生成页面了

2013-05-28 16:37:15 +08:00
 Yuguo
在本地调试jekyll没有问题,push到github之后提示错误:

The page build failed with the following error:

page build failed

For information on troubleshooting Jekyll see https://help.github.com/articles/using-jekyll-with-pages#troubleshooting
If you have any questions please contact GitHub Support.

实在无法判定错误在哪里(之前一直是OK的),邮件过去之后得到的回复是:

We do run a slightly modified version of Jekyll for our GitHub Page engine. Most of the behavior is identical, but once in a while we'll see a discrepancy between our version and the public version. If you send me a link to the repository that's giving you trouble, I can dig through the error log to find where the build got hung up.

只有我遇到这个问题吗?
5511 次点击
所在节点    Jekyll
18 条回复
freetstar
2013-05-28 16:38:17 +08:00
本地jekyll --pygments --safe --auto --server
看看有什么错误信息吗
Yuguo
2013-05-28 16:42:14 +08:00
@freetstar
yu-chandlermatoMacBook-Pro:yuguo yuchandler$ jekyll --pygments --safe --auto --server
Configuration from /Users/yuchandler/Sites/yuguo/_config.yml
Auto-regenerating enabled: /Users/yuchandler/Sites/yuguo -> /Users/yuchandler/Sites/yuguo/_site
[2013-05-28 16:41:00] regeneration: 609 files changed
[2013-05-28 16:41:00] INFO WEBrick 1.3.1
[2013-05-28 16:41:00] INFO ruby 1.8.7 (2012-02-08) [universal-darwin11.0]
[2013-05-28 16:41:01] INFO WEBrick::HTTPServer#start: pid=12851 port=4000

成功无误
freetstar
2013-05-28 17:27:12 +08:00
删除_site/目录试试行吗,我有时候也是本地ok,github pages不ok,有时候删除_site能发现问题
Yuguo
2013-05-28 17:33:07 +08:00
@freetstar 删除了,重新生成本地没问题。
.gitignore也设定了忽略_site,所以还是没定位到问题。
wogong
2013-05-28 18:52:30 +08:00
可能是jekyll版本不一样导致的,我也遇到过。

http://www.wogong.net/it/2013/01/22/Github-Page-Build-Failure/
xi4oh4o
2013-05-28 19:04:49 +08:00
升级到最新的jekyll再试试看

我fork了一下你的blog,然后发现
Generating... Error reading file /Users/xi4oh4o/Documents/repo/fishguo321.github.com/_posts/2012-06-27-font-face-in-action.md: (<unknown>): found character that cannot start any token while scanning for the next token at line 3 column 8
done.
thedevil5032
2013-05-28 19:34:54 +08:00
可能需要修改某个文件里面的日期格式设置。我也曾经遇到过这样的问题。
llbgurs
2013-05-28 22:07:24 +08:00
是不是用了什么插件了
yangzh
2013-05-28 23:06:03 +08:00
删除本地 _site

jekyll --pygments --safe --server

不要添加 auto 参数。
iamsk
2013-05-29 10:19:13 +08:00
官方文档有介绍,大多数是版本问题,如果本地 OK,线上有问题,则基本肯定了,设置为建议的版本,在本地调试看看结果
Yuguo
2013-05-29 11:32:18 +08:00
@wogong 升级到官方指引的相同版本了,rdiscount版本本地略高一点不过我相信问题不在这里
@yangzh 最新的jekyll是双命令,这句单命令的已经失效了。
@llbgurs 没有啊
@thedevil5032 怎么定位到是哪个文件?
@xi4oh4o 额,怎么出现这个错误的
@iamsk 是指定版本了,本地无误

话说markdown用什么引擎呢?我一直都是kramdown
skydiver
2013-05-29 11:38:56 +08:00
@xi4oh4o 感觉像编码问题唉。。
thedevil5032
2013-05-29 11:42:33 +08:00
当时我改的是这个文件:
_includes/themes/twitter/post.html

30 行

- {{ page.date | date_to_long_string }
+ {{ page.date | date: "%d %B %Y" }

==
详情见: https://github.com/thedevil7/thedevil7.github.com/commit/4a106220047f1b37ed713b2eb8e3c005d47b74c3
Yuguo
2013-05-29 11:48:17 +08:00
@skydiver 编码一样都是UTF-8,我试过删掉这个文件也没用,也把标题的@去掉了,没用……

@thedevil5032 我的日期就是后面这种语法了
yangzh
2013-05-29 12:14:00 +08:00
@Yuguo 以为你是用旧版本的。那么就用

jekyll serve --config_config.yml
yangzh
2013-05-29 12:14:31 +08:00
@Yuguo
jekyll serve --config _config.yml
yangzh
2013-05-29 12:22:00 +08:00
@Yuguo 好吧其实我也搞不清你是什么问题。。

如果说到 markdown 引擎的话,github 官方使用 redcarpet, 个人建议这个,它天然支持 github favored markdown 。
Yuguo
2013-05-29 16:42:44 +08:00
最后也没搞明白是什么原因,只好把_site push上来了,不折腾了,唉

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/70419

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX