From 827d5fbb1db096a5af08335bfa9e86ec0a9160b0 Mon Sep 17 00:00:00 2001 From: Thomas Reynolds Date: Wed, 20 Jan 2016 10:41:54 -0800 Subject: [PATCH] Still parse frontmatter on ignored resources. Proxies need it --- middleman-core/lib/middleman-core/application.rb | 6 ------ .../lib/middleman-core/core_extensions/front_matter.rb | 7 ++++++- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/middleman-core/lib/middleman-core/application.rb b/middleman-core/lib/middleman-core/application.rb index 6915d51e..38c2baf4 100644 --- a/middleman-core/lib/middleman-core/application.rb +++ b/middleman-core/lib/middleman-core/application.rb @@ -184,12 +184,6 @@ module Middleman end }, 'Callbacks that can exclude paths from the sitemap' - # Set textual delimiters that denote the start and end of frontmatter - define_setting :frontmatter_delims, { - json: [%w(;;; ;;;)], - yaml: [%w(--- ---), %w(--- ...)] - }, 'Allowed frontmatter delimiters' - define_setting :skip_build_clean, proc { |p| [/\.git/].any? { |r| r.match(p) } }, 'Whether some paths should not be removed during a clean build.' define_setting :watcher_disable, false, 'If the Listen watcher should not run' 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 ffde6b19..ea3f38af 100644 --- a/middleman-core/lib/middleman-core/core_extensions/front_matter.rb +++ b/middleman-core/lib/middleman-core/core_extensions/front_matter.rb @@ -14,6 +14,12 @@ module Middleman::CoreExtensions # Try to run after routing but before directory_indexes self.resource_list_manipulator_priority = 20 + # Set textual delimiters that denote the start and end of frontmatter + define_setting :frontmatter_delims, { + json: [%w(;;; ;;;)], + yaml: [%w(--- ---), %w(--- ...)] + }, 'Allowed frontmatter delimiters' + def initialize(app, options_hash={}, &block) super @@ -29,7 +35,6 @@ module Middleman::CoreExtensions def manipulate_resource_list(resources) resources.each do |resource| next if resource.binary? - next if resource.ignored? next if resource.file_descriptor.nil? fmdata = data(resource.file_descriptor[:full_path].to_s).first.dup