🙈 Syntax Highlighter

Rouge is a pure Ruby syntax highlighter. It can highlight over 200 different languages, and output HTML or ANSI 256-color text. Its HTML output is compatible with stylesheets designed for Pygments.

Table of Contents

Dr. Jekyll uses Rouge for syntax highlighting in code blocks and inline code. Include the language after the opening backticks to enable syntax highlighting:

```ruby
def hello_world
  puts "Hello, world!"
end
```

This will render as:

def hello_world
  puts "Hello, world!"
end

You can also use liquid for syntax highlighting in Jekyll templates:


{% highlight liquid %}
  {% assign name = "Dr. Jekyll" %}
  Hello, {{ name }}!
{% endhighlight %}

This will render as:


{% assign name = "Dr. Jekyll" %}
Hello, {{ name }}!


Dr. Jekyll’s extended language support includes:


Table of contents