1
0
Fork 0
mirror of https://github.com/sinatra/sinatra synced 2023-03-27 23:18:01 -04:00

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

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