2013-06-28 22 views
0

我在Octopress中使用kramdown一段時間。我想添加CodeRay到我的Octopress。我安裝了代碼。無法在Octopress中添加class =「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 

我已經加入青菜/自定義/ _coderay-github.scss,我可以看到他們在我的CSS。

我使用了以下內容,但是他們都沒有添加標籤到我的html,所以它不呈現CodeRay的CSS。

~~~ 
def hello 
    puts "hello world" 
end 
~~~ 
{:lang="ruby"} 

縮進:

puts "hello world" 
{:lang="ruby"} 

誰能告訴我如何CodeRay添加到我的Octopress?我正在關注post

預先感謝您。

+0

有你加入kramdown和coderay到你的Gemfile? – Polygnome

+0

是的,我有他們。我確實捆綁安裝。 – shin

回答

0

好的,我在this page找到答案。

~~~ 
def what? 
    42 
end 
~~~ 
{:.language-ruby} 

或者

~~~ ruby 
def what? 
    42 
end 
~~~