Skip to content

Commit

Permalink
content_for support
Browse files Browse the repository at this point in the history
  • Loading branch information
tdreyno committed Jul 29, 2009
1 parent 178415b commit 2176bb3
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Expand Up @@ -7,3 +7,6 @@
[submodule "vendor/rack-test"]
path = vendor/rack-test
url = git://github.com/brynary/rack-test.git
[submodule "vendor/sinatra-content-for"]
path = vendor/sinatra-content-for
url = git://github.com/foca/sinatra-content-for.git
10 changes: 10 additions & 0 deletions lib/middleman.rb
Expand Up @@ -9,6 +9,9 @@
# Include maruku support
require File.join(File.dirname(__FILE__), '..', 'vendor', 'sinatra-maruku', 'lib', 'sinatra', 'maruku')

# Include content_for support
require File.join(File.dirname(__FILE__), '..', 'vendor', 'sinatra-content-for', 'lib', 'sinatra', 'content_for')

class Middleman < Sinatra::Base
set :app_file, __FILE__
set :static, true
Expand All @@ -17,6 +20,13 @@ class Middleman < Sinatra::Base

helpers Sinatra::Markaby
helpers Sinatra::Maruku
helpers Sinatra::ContentFor

helpers do
def link_to(title, url="#")
%Q{<a href="#{url}">#{title}</a>}
end
end

def self.run!(options={}, &block)
set options
Expand Down
1 change: 1 addition & 0 deletions vendor/sinatra-content-for
Submodule sinatra-content-for added at e586a1

0 comments on commit 2176bb3

Please sign in to comment.