升级Jekyll 3.0

每一次的升级都得又一次折腾一次,jekyll也不例外
从jekyll 2.5.2 升级为jekyll 3.0.1

错误一:

jekyll 3.0.1 | Error:  Permission denied - bind(2) for 127.0.0.1:4000

端口被占有,打开_config.yml 在最后加上一行 port: 5001 (其它也可)问题解决

错误二:

  Dependency Error: Yikes! It looks like you don't have redcarpet or one of its
dependencies installed. In order to use Jekyll as currently configured, you'll n
eed to install this gem. The full error message from Ruby is: 'cannot load such
file -- redcarpet' If you run into trouble, you can find helpful resources at ht
tp://jekyllrb.com/help/!
  Conversion error: Jekyll::Converters::Markdown encountered an error while conv
erting '_posts/2014-12-28-first-blog.md':
                    redcarpet
             ERROR: YOUR SITE COULD NOT BE BUILT:
                    ------------------------------------
                    redcarpet

_config.yml中的markdown改为kramdown

Jekyll 3 使用Rouge而不是Pygments

最后 删除highlighter,markdown 加入:

kramdown:
  input: GFM
  syntax_highlighter: rouge

ps:仅仅在本地执行jekyll的时候会出现这些问题,在github上还一切正常。

在 _post 下加入一篇文章还要执行一下build命令 (⊙﹏⊙)b)

jekyll build
# => 当前目录中的内容将会生成到 ./site 目录中。

參考:Upgrading to Jekyll 3.0

作者:itmyhome

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值