diff --git a/lib/middleman.rb b/lib/middleman.rb index 80bb1f78..818b5b60 100644 --- a/lib/middleman.rb +++ b/lib/middleman.rb @@ -23,8 +23,9 @@ class Middleman < Sinatra::Base helpers Sinatra::ContentFor helpers do - def link_to(title, url="#") - %Q{#{title}} + def link_to(title, url="#", params={}) + params = params.map { |k,v| %Q{#{k}="#{v}"}}.join(' ') + %Q{#{title}} end end