fix front_matter load order. fixes #122

This commit is contained in:
Thomas Reynolds 2011-09-27 12:10:37 -07:00
parent 3c0cddc936
commit c814677f44
5 changed files with 5 additions and 4 deletions

View file

@ -28,7 +28,7 @@ module Middleman::CoreExtensions::FrontMatter
::Tilt.prefer(HamlTemplate) ::Tilt.prefer(HamlTemplate)
app.after_configuration do app.after_configuration do
app.before_processing(:front_matter) do |result| app.before_processing(:front_matter, 0) do |result|
if result && Tilt.mappings.has_key?(result[1].to_s) if result && Tilt.mappings.has_key?(result[1].to_s)
extensionless_path, template_engine = result extensionless_path, template_engine = result
full_file_path = "#{extensionless_path}.#{template_engine}" full_file_path = "#{extensionless_path}.#{template_engine}"

View file

@ -16,6 +16,7 @@ module Middleman::Renderers::Liquid
if result && result[1] == :liquid if result && result[1] == :liquid
request['custom_locals'] ||= {} request['custom_locals'] ||= {}
request['custom_locals'][:data] = data.to_h request['custom_locals'][:data] = data.to_h
# request['custom_locals'].merge(data.to_h)
end end
true true

View file

@ -1,3 +1,3 @@
module Middleman module Middleman
VERSION = "2.0.9" VERSION = "2.0.10"
end end

View file

@ -45,7 +45,7 @@ eos
s.add_dependency("sinatra", ["~> 1.2.6"]) s.add_dependency("sinatra", ["~> 1.2.6"])
s.add_dependency("rack-test", ["~> 0.6.1"]) s.add_dependency("rack-test", ["~> 0.6.1"])
s.add_dependency("uglifier", ["~> 1.0.0"]) s.add_dependency("uglifier", ["~> 1.0.0"])
s.add_dependency("slim", ["~> 1.0.1"]) s.add_dependency("slim", ["~> 1.0.2"])
s.add_dependency("haml", ["~> 3.1.0"]) s.add_dependency("haml", ["~> 3.1.0"])
s.add_dependency("sass", ["~> 3.1.7"]) s.add_dependency("sass", ["~> 3.1.7"])
s.add_dependency("compass", ["~> 0.11.3"]) s.add_dependency("compass", ["~> 0.11.3"])

View file

@ -46,7 +46,7 @@ eos
# s.add_dependency("sinatra-synchrony", ["~> 0.2.1"]) # s.add_dependency("sinatra-synchrony", ["~> 0.2.1"])
s.add_dependency("rack-test", ["~> 0.6.1"]) s.add_dependency("rack-test", ["~> 0.6.1"])
s.add_dependency("uglifier", ["~> 1.0.0"]) s.add_dependency("uglifier", ["~> 1.0.0"])
s.add_dependency("slim", ["~> 1.0.1"]) s.add_dependency("slim", ["~> 1.0.2"])
s.add_dependency("haml", ["~> 3.1.0"]) s.add_dependency("haml", ["~> 3.1.0"])
s.add_dependency("sass", ["~> 3.1.7"]) s.add_dependency("sass", ["~> 3.1.7"])
s.add_dependency("compass", ["~> 0.11.3"]) s.add_dependency("compass", ["~> 0.11.3"])