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

jekyll中的代码高亮唯独不能高亮PHP,怎么办?

  •  
  •   dongbeta · May 3, 2012 · 4063 views
    This topic created in 5140 days ago, the information mentioned may be changed or developed.
    无法高亮:
    {% highlight php %}
    echo "hello";
    {% endhighlight %}

    可以高亮:
    {% highlight javascript %}
    alert("test");
    {% endhighlight %}

    尝试的结果是,只有PHP无法被高亮。

    _config.yml 的配置是:

    permalink: /:year/:month/:title/
    markdown: rdiscount
    pygments: true

    请教一下如何处理? 谢谢!
    1 replies    1970-01-01 08:00:00 +08:00
    Andor_Chen
        1
    Andor_Chen  
       May 3, 2012
    php 代码的高亮,必须提供 open 和 close tag:

    {% highlight php %}
    <?php
    echo "hello";
    ?>
    {% endhighlight %}
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3634 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 00:16 · PVG 08:16 · LAX 17:16 · JFK 20:16
    ♥ Do have faith in what you're doing.