From c1f7299cfd8a52bda3616b8b2f2b178b7d95037c Mon Sep 17 00:00:00 2001 From: Ben Hollis Date: Sat, 29 Mar 2014 17:21:49 -0700 Subject: [PATCH] Fix some references to extensions[:frontmatter] --- .../lib/middleman-core/core_extensions/front_matter.rb | 5 ++--- middleman-core/lib/middleman-core/file_renderer.rb | 6 +++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/middleman-core/lib/middleman-core/core_extensions/front_matter.rb b/middleman-core/lib/middleman-core/core_extensions/front_matter.rb index cffd234f..41ec27ac 100644 --- a/middleman-core/lib/middleman-core/core_extensions/front_matter.rb +++ b/middleman-core/lib/middleman-core/core_extensions/front_matter.rb @@ -32,7 +32,6 @@ module Middleman::CoreExtensions end def after_configuration - app.extensions[:frontmatter] = self app.ignore %r{\.frontmatter$} ::Middleman::Sitemap::Resource.send :include, ResourceInstanceMethods @@ -45,7 +44,7 @@ module Middleman::CoreExtensions [:layout, :layout_engine].each do |opt| data[opt] = fmdata[opt] unless fmdata[opt].nil? end - + if fmdata[:renderer_options] data[:renderer_options] = {} fmdata[:renderer_options].each do |k, v| @@ -71,7 +70,7 @@ module Middleman::CoreExtensions # @private # @return [Hash] def raw_data - app.extensions[:frontmatter].data(source_file).first + app.extensions[:front_matter].data(source_file).first end # This page's frontmatter diff --git a/middleman-core/lib/middleman-core/file_renderer.rb b/middleman-core/lib/middleman-core/file_renderer.rb index 0393ad83..6d3e4dd1 100644 --- a/middleman-core/lib/middleman-core/file_renderer.rb +++ b/middleman-core/lib/middleman-core/file_renderer.rb @@ -84,8 +84,8 @@ module Middleman # @param [String] path # @return [String] def get_template_data_for_file - if @app.extensions[:frontmatter] - @app.extensions[:frontmatter].template_data_for_file(@path) + if @app.extensions[:front_matter] + @app.extensions[:front_matter].template_data_for_file(@path) else File.read(File.expand_path(@path, source_dir)) end @@ -116,4 +116,4 @@ module Middleman end end end -end \ No newline at end of file +end