Add BlueCloth example to README.

This commit is contained in:
Konstantin Haase 2011-01-11 09:13:18 +01:00
parent 9eb72a4a52
commit a743c7db99
1 changed files with 22 additions and 4 deletions

View File

@ -351,15 +351,31 @@ The rdiscount gem/library is required to render Markdown templates:
Renders <tt>./views/index.markdown</tt> (+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 <tt>./views/index.md</tt> 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 <tt>./views/index.textile</tt>.
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 <tt>./views/index.rdoc</tt>.
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) }