In Sinatra, you don’t usually use the render
method directly, rather you use the method corresponding to the appropriate template language, in this case markdown
.
You should be able to pass any options you want to this method as a hash, and Sinatra (and Tilt) will pass them to the template engine. However, the latest released Tilt gem (1.3.3) doesn’t pass all the options for markdown through, only :filter_html
and :smart
, so this won’t work. This is fixed in the current Tilt head, it just hasn’t made its way to a released gem yet.
If you’re using Bundler, you could work around this by using Bundler’s Git support:
gem 'tilt', :git => 'git://github.com/rtomayko/tilt.git'
Alternatively you could download the latest version of Tilt and make sure its lib
directory is on your apps load path, perhaps putting it into a vendor
directory.