github jekyll无法生成页面了 - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Yuguo
V2EX    Jekyll

github jekyll无法生成页面了

  •  
  •   Yuguo 2013-05-28 16:37:15 +08:00 5992 次点击
    这是一个创建于 4566 天前的主题,其中的信息可能已经有所发展或是发生改变。
    在本地调试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.

    只有我遇到这个问题吗?
    18 条回复    1970-01-01 08:00:00 +08:00
    freetstar
        1
    freetstar  
       2013-05-28 16:38:17 +08:00
    本地jekyll --pygments --safe --auto --server
    看看有什么错误信息吗
    Yuguo
        2
    Yuguo  
    OP
       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
        3
    freetstar  
       2013-05-28 17:27:12 +08:00
    删除_site/目录试试行吗,我有时候也是本地ok,github pages不ok,有时候删除_site能发现问题
    Yuguo
        4
    Yuguo  
    OP
       2013-05-28 17:33:07 +08:00
    @freetstar 删除了,重新生成本地没问题。
    .gitignore也设定了忽略_site,所以还是没定位到问题。
    wogong
        5
    wogong  
       2013-05-28 18:52:30 +08:00
    可能是jekyll版本不一样导致的,我也遇到过。

    http://www.wogong.net/it/2013/01/22/Github-Page-Build-Failure/
    xi4oh4o
        6
    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
        7
    thedevil5032  
       2013-05-28 19:34:54 +08:00 via iPad
    可能需要修改某个文件里面的日期格式设置。我也曾经遇到过这样的问题。
    llbgurs
        8
    llbgurs  
       2013-05-28 22:07:24 +08:00
    是不是用了什么插件了
    yangzh
        9
    yangzh  
       2013-05-28 23:06:03 +08:00
    删除本地 _site

    jekyll --pygments --safe --server

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

    话说markdown用什么引擎呢?我一直都是kramdown
    skydiver
        12
    skydiver  
       2013-05-29 11:38:56 +08:00
    @xi4oh4o 感觉像编码问题唉。。
    thedevil5032
        13
    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
        14
    Yuguo  
    OP
       2013-05-29 11:48:17 +08:00
    @skydiver 编码一样都是UTF-8,我试过删掉这个文件也没用,也把标题的@去掉了,没用……

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

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

    如果说到 markdown 引擎的话,github 官方使用 redcarpet, 个人建议这个,它天然支持 github favored markdown 。
    Yuguo
        18
    Yuguo  
    OP
       2013-05-29 16:42:44 +08:00
    最后也没搞明白是什么原因,只好把_site push上来了,不折腾了,唉
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     3118 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 24ms UTC 12:16 PVG 20:16 LAX 04:16 JFK 07:16
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86