V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Jekyll
http://jekyllrb.com/
Jekyll on GitHub
https://github.com/mojombo/jekyll
Jekyll-bootstrap
http://jekyllbootstrap.com/
Octopress
http://octopress.org/
Yuguo
V2EX  ›  Jekyll

github jekyll无法生成页面了

  •  
  •   Yuguo · 2013-05-28 16:37:15 +08:00 · 5478 次点击
    这是一个创建于 3992 天前的主题,其中的信息可能已经有所发展或是发生改变。
    在本地调试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   ·   我们的愿景   ·   实用小工具   ·   865 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 19:18 · PVG 03:18 · LAX 12:18 · JFK 15:18
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.