This template includes rouge
and middleman-syntax
to enable code highlighting. If you open source/stylesheets/code_highlighting.css.erb
you’ll see this:
<%= Rouge::Theme.find("base16.solarized.light").render(:scope => '.highlight') %>
This is styling with the Rouge “Base16 Solarized” theme. You can view a full preview of Rouge themes here or also here. The API reference is available from the RubyDoc page.
Here’s some code examples:
# ruby
#
def hello(name)
puts "hello, #{name}"
end
hello("world!")
// c
//
#include <stdio.h>
int main() {
printf("hello, world!");
return 0;
}