18

I'm buliding a site with github pages and do not want underscores within words to italicize portions of those words. E.g. function_name_here should not render with name italicized. I understand github flavored markdown is supposed to be smart like this; but I'm still seeing italics in my rendered page.

I have set in my _config.yml

markdown: redcarpet

... anything else I need to do to get Github flavored markdown behavior?

Bosh
  • 8,138
  • 11
  • 51
  • 77

1 Answers1

20

The version of Jekyll available on github's gh-pages does not run the latest version of redcarpet (redcarpet2) which supports these features. There's a plugin to provide the latest version of redcarpet to Jekyll, in which you can then configure to the behaviour you want, i.e. then add this to your _config.yml

markdown: redcarpet2
redcarpet:
  extensions: ["no_intra_emphasis", "fenced_code_blocks", "autolink", "tables",     "with_toc_data"]

Yes, I agree it seems crazy that github doesn't run the same markdown parser on gh-pages as it uses for its github-flavored-markdown everywhere else on the site.

cboettig
  • 12,377
  • 13
  • 70
  • 113
  • 14
    As of Jekyll 0.12.0, redcarpet2 is supported by Jekyll without the need for a plugin, so the approach shown in the original question should now work without additional modification. – cboettig Feb 13 '13 at 00:40
  • 2
    According to the [GitHub pages Jeklly docs](https://help.github.com/articles/using-jekyll-with-pages) they are now using redcarpet 2.2.2. – Evan Purkhiser Jun 24 '13 at 07:53