diff --git a/lib/middleman/core_extensions/front_matter.rb b/lib/middleman/core_extensions/front_matter.rb index 35b20356..baa842e8 100644 --- a/lib/middleman/core_extensions/front_matter.rb +++ b/lib/middleman/core_extensions/front_matter.rb @@ -66,7 +66,7 @@ module Middleman::CoreExtensions::FrontMatter next if file.match(/\/\./) || (file.match(/\/_/) && !file.match(/\/__/)) || File.directory?(file) - + touch_file(file) end end @@ -76,6 +76,9 @@ module Middleman::CoreExtensions::FrontMatter end def touch_file(file) + extension = File.extname(file).sub(/\./, "") + return unless ::Tilt.mappings.has_key?(extension) + content = File.read(file) file = file.sub(@source, "") result = parse_front_matter(content) diff --git a/lib/middleman/guard.rb b/lib/middleman/guard.rb index d61dd4b9..f41084e7 100644 --- a/lib/middleman/guard.rb +++ b/lib/middleman/guard.rb @@ -23,7 +23,6 @@ module Middleman options_hash << ", :#{k} => '#{v}'" end - $stderr.puts options_hash.inspect guardfile_contents = %Q{ guard 'middleman'#{options_hash} do watch(%r{(.*)})