我正在使用 Jekyll 和颜料来突出显示我博客中的一些代码,并且突出显示标签中的任何代码似乎都消失了,即没有生成 Html。
这是一些此类代码的示例
{% highlight java %}
ObjectMapper mapper = new ObjectMapper();
mapper.getSerializationConfig().
setSerializationInclusion(JsonSerialize.Inclusion.NON_NULL);
{% endhighlight %}
其他一些细节;
- 操作系统:OSX Mountain Lion Ruby 版本:
- ruby 1.9.3p194(2012-04-20 修订版 35410)[x86_64-darwin12.1.0]
- Jekyll 版本:Jekyll 0.11.2
谷歌搜索时有人建议运行这个命令来检查 pygments
echo 'puts "Hello World"' | pygmentize -l ruby -f html -O encoding=utf-8
对我来说,它返回此错误:
Traceback (most recent call last):
File "/usr/local/bin/pygmentize", line 5, in <module>
from pkg_resources import load_entry_point
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2603, in <module>
working_set.require(__requires__)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 666, in require
needed = self.resolve(parse_requirements(requirements))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve
raise DistributionNotFound(req) # XXX put more info here
pkg_resources.DistributionNotFound: Pygments==1.5