iprog.com

Moving to Markdown

In the past I’ve used Textile markup for this blog, processed by the RedCloth gem. It has done (and continues to do) a good job.

However, it seems the trend is toward Markdown. GitHub, StackExchange, and others have all embraced it. A new project I’m working on will also be using Markdown.

It seemed like it was time to move to Markdown here on the blog too.

There are a number of gems capable of processing Markdown. However, one of the most extensive appears to be redcarpet. It has baked-in support for most of GFM (GitHub-flavored Markdown), which is a bonus.

Going forward, all posts will be rendered accordingly. As a bonus, GFM’s fenced-code-blocks are much cleaner than what I had hacked in previously, so there should be fewer weird-syntax-highlighting issues. I don’t plan on going back to cleanup the old posts though.

Oh, and comments now enjoy Markdown too! Yay!

As an aside, way back I discussed syntax highlighting in rails. My current gem of choice is coderay. Most of the options are just Ruby wrappers for the Python-based pygments. That’s a viable solution, but if you want to keep it Ruby-native, then coderay is a nice alternative.

tags: syntax highlighting, markdown