用Jekyll和pygments突出显示不起作用 [英] Highlight with Jekyll and pygments doesn't work

查看:69
本文介绍了用Jekyll和pygments突出显示不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将色素杰基尔

我有以下代码:

{% highlight java %}
NullPointerException at org.springframework.core.GenericTypeResolver.getTypeVariableMap
{% endhighlight %}

当我使用jekyll --pygments生成网站时,html结果为:

When I generate my site with jekyll --pygments, the html result is:

<div>
  <pre><code class="java">NullPointerException at org.springframework.core.GenericTypeResolver.getTypeVariableMap</code>
  </pre>
</div>

在此html输出中,没有预期的<span class="n"><span class="s2">标签,并且代码未突出显示.

In this html output there aren't the expected <span class="n"> or <span class="s2"> tags, and the code is not highlighted.

我做错什么了吗?

推荐答案

您需要生成CSS以突出显示.

You need to have the css generated to highlight.

$ pygmentize -S default -f html > css/pygments/default.css

这篇关于用Jekyll和pygments突出显示不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆