now Octopress uses partials

This commit is contained in:
B Mathis 2010-03-10 12:23:30 -06:00
parent 1957c12499
commit eefe29e5d0
17 changed files with 176 additions and 114 deletions

View file

@ -111,8 +111,6 @@ module Helpers
end
include TagHelper
# My added helpers
def to_html_email(address)
email = string_to_html(address)
"<a href=\"#{string_to_html('mailto:')}#{email}\">#{email}</a>"
@ -165,7 +163,7 @@ module Helpers
# A very hackish way to handle partials. We'll go with it till it breaks...
def include(partial_name)
file_ext = partial_name[(partial_name.index('.') + 1)..partial_name.length]
contents = IO.read("_includes/#{partial_name}")
contents = IO.read("source/_includes/#{partial_name}")
case file_ext
when 'haml'
Haml::Engine.new(contents).render(binding)
@ -180,6 +178,7 @@ module Helpers
end
include PartialsHelper
end
class String