Still parse frontmatter on ignored resources. Proxies need it

feature/domain-checker
Thomas Reynolds 2016-01-20 10:41:54 -08:00
parent 2864902fa0
commit 827d5fbb1d
2 changed files with 6 additions and 7 deletions

View File

@ -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'

View File

@ -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