diff --git a/README.markdown b/README.markdown index 2bf1472..102fa0c 100644 --- a/README.markdown +++ b/README.markdown @@ -1,4 +1,4 @@ -\# Sinatra Extension: StaticAssets +# Sinatra Extension: StaticAssets Gem *sinatra-static-assets* implements the following helpers methods: @@ -102,14 +102,18 @@ deployments](http://www.modrails.com/documentation/Users%20guide%20Apache.html#s ## Usage examples -In HTML `` and `` tags have no end tag. +In HTML (and HTML5) `` and `` tags have no end tag. In XHTML, on the contrary, these tags must be properly closed. We can choose the appropriate behaviour with *closed* option: image_tag "/images/tatry1.jpg", :alt => "Błyszcz, 2159 m", :closed => true -The default value of *closed* option is `false`. +The default value of *closed* option is `false`. We can change the default value with: + + enable :xhtml + +We can pass mutliple stylesheets or scripts: stylesheet_link_tag "/stylesheets/screen.css", "/stylesheets/summer.css", :media => "projection" javascript_script_tag "/javascripts/jquery.js", "/javascripts/summer.js", :charset => "iso-8859-2" @@ -130,7 +134,7 @@ Or, if subclassing `Sinatra::Base`, include helpers manually: class Summer < Sinatra::Base helpers Sinatra::UrlForHelper - helpers Sinatra::StaticAssets + register Sinatra::StaticAssets # ... end diff --git a/examples/rsummer/summer.rb b/examples/rsummer/summer.rb index 92af6ac..ddc8503 100644 --- a/examples/rsummer/summer.rb +++ b/examples/rsummer/summer.rb @@ -8,7 +8,7 @@ require 'sinatra/static_assets' module Sinatra class Summer < Sinatra::Base helpers Sinatra::UrlForHelper - helpers Sinatra::StaticAssets + register Sinatra::StaticAssets set :app_file, __FILE__ set :static, true diff --git a/examples/rwinter/winter.rb b/examples/rwinter/winter.rb index 8de7a7f..e573f9d 100644 --- a/examples/rwinter/winter.rb +++ b/examples/rwinter/winter.rb @@ -8,7 +8,7 @@ require 'sinatra/static_assets' module Sinatra class Winter < Sinatra::Base helpers Sinatra::UrlForHelper - helpers Sinatra::StaticAssets + register Sinatra::StaticAssets set :app_file, __FILE__ set :static, true