As pointed out by @David Douglas, "GitHub Pages now only supports Rouge, a pure-Ruby syntax highlighter"
You have to put this in you _config.yml
. This is from the _config.yml
of Barry Clark's Jekyll Now
# Jekyll 3 now only supports Kramdown for Markdown
kramdown:
# Use GitHub flavored markdown, including triple backtick fenced code blocks
input: GFM
# Jekyll 3 and GitHub Pages now only support rouge for syntax highlighting
syntax_highlighter: rouge
syntax_highlighter_opts:
# Use existing pygments syntax highlighting css
css_class: 'highlight'
Then for the code highlighting part...
The list of langauge aliases for Rouge are listed here: https://github.com/jneen/rouge/wiki/List-of-supported-languages-and-lexers
It uses all-lowercase latters.
For example, for JavaScript:
``` javascript
function test() {
console.log("test");
}
```