Add 'Associating File Extensions' section to README.

This commit is contained in:
Konstantin Haase 2011-01-11 10:37:25 +01:00
parent 705c93f06b
commit d7aa6a3b83
1 changed files with 8 additions and 0 deletions

View File

@ -635,6 +635,14 @@ or disable them by default via <tt>set :haml, :layout => false</tt>.
haml :index, :layout => !request.xhr?
end
=== Associating File Extensions
To associate a file extension with a template engine, use
<tt>Tilt.register</tt>. For instance, if you like to use the file extension
+tt+ for Textile templates, you can do the following:
Tilt.register :tt, Tilt[:textile]
== Helpers
Use the top-level <tt>helpers</tt> method to define helper methods for use in