5

I'm using Jekyll-Bootstrap now. In my local environment, I can enable CodeRay in jekyll's _config.yml and use it in my posts without any problem. But the same code cannot work on github.

My _config.yml (jekyll-bootstrap configs are omitted):

# Use kramdown as markdown parser engine.
markdown:      kramdown
markdown_ext:  markdown,mkd,mkdn,md
textile_ext:   textile

kramdown:
  auto_ids: true
  footnote_nr: 1
  entity_output: as_char
  toc_levels: 1..6
  smart_quotes: lsquo,rsquo,ldquo,rdquo
  use_coderay: true

  coderay:
    coderay_wrap: div
    coderay_line_numbers: nil
    coderay_tab_width: 4
    coderay_bold_every: 10
    coderay_css: class
huandu
  • 128
  • 6
  • I'm having the exact same problem. CodeRay is working fine locally but not on GitHub Pages. Have you made any progress on this issue since you posted the question? – Hady Jun 13 '14 at 02:57
  • No. And it seems the only way to use CodeRay is to follow the answer I mark as accepted. – huandu Jun 14 '14 at 13:04

2 Answers2

2

You can use kramdown with coderay on github pages. Just include

markdown: kramdown
kramdown:
  use_coderay: true

in your _config.yml.

Polygnome
  • 7,159
  • 2
  • 30
  • 55
  • I was using kramdown with CodeRay. But github page doesn't work as expected. I update my question to include `_config.yml` now. – huandu Oct 15 '13 at 10:30
1

GithHb pages runs a minimal ruby / ruby gems configuration, it will also overide some of your _config.yml settings see https://help.github.com/articles/using-jekyll-with-pages for some more information.

One way around this is to build locally and then sync the generated output with GitHub pages bypassing GitGub's Jekyll configuration.

RobertKenny
  • 3,051
  • 2
  • 16
  • 17
  • how to bypassing this issue? I am facing the same issue here, all layout are looking good only on local, thx! – user378132 Jul 30 '14 at 01:53