RubyFlow The Ruby and Rails community linklog

×

The Ruby and Rails community linklog

Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!

Render Markdown views with Redcarpet and Pygment in Rails

This Lugo Labs Tutor tutorial shows a way how to create a Rails renderer for Markdown so we can use it in views as we do when we write HTML. The view will need to support all Markdown syntax and Pygments, to prettify any code we have in the view. The code should be wrapped within a tag decorated with a class specifying the language in which the code is written, following standard Markdown syntax.

Comments

Why Pygments if you have better syntax colouring support in pure Ruby with Rouge? https://github.com/jneen/rouge

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in