Jekyll
› http://jekyllrb.com/
Jekyll on GitHub
› https://github.com/mojombo/jekyll
Jekyll-bootstrap
› http://jekyllbootstrap.com/
Octopress
› http://octopress.org/
VeryCB
V2EX  ›  Jekyll

用rake创建post的问题

  •  
  •   VeryCB · Mar 6, 2012 · 6200 views
    This topic created in 5355 days ago, the information mentioned may be changed or developed.
    刚开始尝试用Jekyll,用rake创建post的时候遇到如图问题,求解答:)

    9 replies  •  1970-01-01 08:00:00 +08:00
    VeryCB
    VeryCB
    OP
    Mar 6, 2012
    1
    img.ly的图貌似显示不出来了...原帖也突然无法edit了...

    有两个问题,第一个是用

    $ rake post title="Hello Jekyll"

    提示日期格式不对,于是我就又再后面加了date="2012-03-05",创建成功。但Jekyll-bootstrap的示例里并没有加日期的相关参数,想问一下是否需要额外设置?

    第二个是在title里面用了叹号(!):

    $ rake post title="Hello Jekyll!"

    提示-bash !": event not found

    iandyh
    iandyh
    Mar 6, 2012
    2
    关于第一个问题,你是不是用 m/d/y 的格式?只是好奇。
    iandyh
    iandyh
    Mar 6, 2012
    3
    系统默认为 m/d/y 没表述清楚。
    VeryCB
    VeryCB
    OP
    Mar 6, 2012
    4
    @iandyh 把系统时间调成了YYYY-MM-DD的格式还是不行:(
    iandyh
    iandyh
    Mar 6, 2012
    5
    你看看 Rakefile 那儿吧,那是源码。我没遇到这个问题。

    或者去 github 那报 issue.
    VeryCB
    VeryCB
    OP
    Mar 6, 2012
    6
    @iandyh 看了下源码,应该跟系统时间格式的设置没关系,源码中用strftime('%Y-%m-%d')把获取到的时间格式化了

    thx anyway :)
    VeryCB
    VeryCB
    OP
    Mar 6, 2012
    7
    关于第一个问题,已经有人在github上报issue了
    https://github.com/plusjade/jekyll-bootstrap/issues/52
    VeryCB
    VeryCB
    OP
    Mar 6, 2012
    8
    关于第二个问题,用单引号代替双引号即可解决:
    $ rake post title="Hello Jekyll!" --> $ rake post title='Hello Jekyll!'
    VeryCB
    VeryCB
    OP
    Mar 6, 2012
    9
    第一个问题也已经解决了:)
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1319 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 20:38 · PVG 04:38 · LAX 12:38 · JFK 15:38
    ♥ Do have faith in what you're doing.