diff --git a/README.rdoc b/README.rdoc index a7a6eeaf..8dde26ad 100644 --- a/README.rdoc +++ b/README.rdoc @@ -351,15 +351,31 @@ The rdiscount gem/library is required to render Markdown templates: Renders ./views/index.markdown (+md+ and +mkd+ are also valid file extensions). -It is not possible to call methods from markdown, nor to pass locals to it. You therefore will usually use it in combination with another rendering engine: +It is not possible to call methods from markdown, nor to pass locals to it. +You therefore will usually use it in combination with another rendering +engine: erb :overview, :locals => { :text => markdown(:introduction) } -Note that you may also call the markdown method from within other templates: +Note that you may also call the +markdown+ method from within other templates: %h1 Hello From Haml! %p= markdown(:greetings) +It is also possible to parse Markdown with BlueCloth rather than RDiscount: + + require 'bluecloth' + + Tilt.register 'markdown', BlueClothTemplate + Tilt.register 'mkd', BlueClothTemplate + Tilt.register 'md', BlueClothTemplate + + get '/' do + markdown :index + end + +Renders ./views/index.md with BlueCloth. + === Textile Templates The RedCloth gem/library is required to render Textile templates: @@ -373,7 +389,8 @@ The RedCloth gem/library is required to render Textile templates: Renders ./views/index.textile. -It is not possible to call methods from textile, nor to pass locals to it. You therefore will usually use it in combination with another rendering engine: +It is not possible to call methods from textile, nor to pass locals to it. You +therefore will usually use it in combination with another rendering engine: erb :overview, :locals => { :text => textile(:introduction) } @@ -395,7 +412,8 @@ The RDoc gem/library is required to render RDoc templates: Renders ./views/index.rdoc. -It is not possible to call methods from rdoc, nor to pass locals to it. You therefore will usually use it in combination with another rendering engine: +It is not possible to call methods from rdoc, nor to pass locals to it. You +therefore will usually use it in combination with another rendering engine: erb :overview, :locals => { :text => rdoc(:introduction) }