V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
tedd
V2EX  ›  问与答

jekyll下面redcarpet怎么弄都不高亮代码...

  •  
  •   tedd · 2013-11-14 00:47:13 +08:00 · 2923 次点击
    这是一个创建于 3840 天前的主题,其中的信息可能已经有所发展或是发生改变。
    按照最新的jekyll指引弄好了github page,redcarpet默认版本也是2+,在配置文件最后也加入了
    markdown: redcarpet
    redcarpet:
    extensions: ["fenced_code_blocks", "autolink", "tables", "strikethrough"]

    但高亮就是不出现...

    ```python
    print 'hello'
    ```

    看了下gem list,需要的gem都有呀,到底肿么了...
    pygments.rb (0.5.4)
    redcarpet (2.3.0)
    jekyll (1.3.0)
    6 条回复    1970-01-01 08:00:00 +08:00
    chloerei
        1
    chloerei  
       2013-11-14 00:50:32 +08:00
    pygments 这个 python 库装了没。
    tedd
        2
    tedd  
    OP
       2013-11-14 00:58:23 +08:00
    @chloerei 回pygments,我之前是直接push到github上面,那里不存在有没有装pigments库吧?我现在是clone到mac本机了,看了你的提示倒也去pip安装上了pygments,但在本机上预览效果也没有任何变化...
    chloerei
        3
    chloerei  
       2013-11-14 01:21:48 +08:00
    还有个参数:

    pygments: true
    tedd
        4
    tedd  
    OP
       2013-11-14 08:37:12 +08:00
    @chloerei 回chloerel,看了下配置,是true的...
    ijse
        5
    ijse  
       2013-11-14 09:38:43 +08:00
    高亮代码还是通过页面JS实现吧,也没什么不好的。
    airwalker
        6
    airwalker  
       2013-11-14 17:29:15 +08:00
    有设定代码高亮的css吗?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   4960 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 03:44 · PVG 11:44 · LAX 20:44 · JFK 23:44
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.