2013-06-28 4 views
0

Octopress에서 kramdown을 사용하고 있습니다. Octopress에 CodeRay를 추가하고 싶었습니다. 나는 코더를 설치했다. 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에서 볼 수 있습니다.

다음 코드를 사용했지만 CodeRay CSS가 렌더링되지 않도록 태그 중 하나도 내 HTML에 추가하지 않았습니다. 들여 쓰기

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

:

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

사람이 어떻게 내 Octopress에 CodeRay을 추가하는 말해 주시겠습니까?

다음은이 post입니다.

미리 감사드립니다.

+0

는 kramdown을 추가하고 Gemfile에 coderay? – Polygnome

+0

네, 가지고 있습니다. 그리고 번들 설치를 수행했습니다. – shin

답변

0

좋아, 대답은 this page에 있습니다.

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

또는

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