githubjekyllgithub-pagescoderayjekyll-bootstrap

Is it possible to use CodeRay in github pages?


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

Solution

  • 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.