Code Highlighting

Just a small thing. I was trying to find a good syntax highlighter for code on this blog and another one I’m about to start. After trying a few, I settled on highlight.js from http://softwaremaniacs.org/soft/highlight/en

You basically need to simply wrap your code in <pre><code></code></pre> and it handles the rest. Here’s an example:


class ThisIsRuby

  def fun
    puts "This is fun!"
  end

end

test = ThisIsRuby.new
puts test.fun

On a semi-related note, I’m still chasing down some nginx config related gremlins. If you see anything weird, let me know in the comments.

Posted in Uncategorized at December 9th, 2009. Trackback URI: trackback

2 Responses to “Code Highlighting”

  1. December 9th, 2009 at 7:05 pm #Jason Amster

  2. December 9th, 2009 at 7:09 pm #Patrick Tulskie

    Yep. Could do that too. Probably should do that, in the spirit of social coding.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>