【发布时间】:2013-06-28 13:22:35
【问题描述】:
我在 Octopress 中使用 kramdown 有一段时间了。我想将 CodeRay 添加到我的 Octopress 中。我安装了coderay。
➜ octopress git:(source) ✗ sudo gem install coderay
Password:
Successfully installed coderay-1.0.9
1 gem installed
Installing ri documentation for coderay-1.0.9...
Installing RDoc documentation for coderay-1.0.9...
我改变了_config.yml
markdown: kramdown
kramdown:
use_coderay: true
coderay:
coderay_line_numbers: table
coderay_css: class
我添加了 sass/custom/_coderay-github.scss,我可以在我的 CSS 中看到它们。
我使用了以下内容,但它们都没有在我的 html 中添加标签,因此它不会呈现 CodeRay css。
~~~
def hello
puts "hello world"
end
~~~
{:lang="ruby"}
缩进:
puts "hello world"
{:lang="ruby"}
谁能告诉我如何将 CodeRay 添加到我的 Octopress 中?
我正在关注这个post。
提前谢谢你。
【问题讨论】:
-
你在 Gemfile 中添加了 kramdown 和 coderay 吗?
-
是的,我有。我做了捆绑安装。
标签: jekyll octopress coderay kramdown