diff --git a/lib/middleman/core_extensions/front_matter.rb b/lib/middleman/core_extensions/front_matter.rb index 4523b504..416f686d 100644 --- a/lib/middleman/core_extensions/front_matter.rb +++ b/lib/middleman/core_extensions/front_matter.rb @@ -52,7 +52,7 @@ module Middleman::CoreExtensions::FrontMatter class FrontMatter class << self def matcher - %r{source/.*\.html} + %r{^source/.*\.html} end end diff --git a/lib/middleman/core_extensions/sitemap.rb b/lib/middleman/core_extensions/sitemap.rb index b58cc922..2fd1dfd6 100644 --- a/lib/middleman/core_extensions/sitemap.rb +++ b/lib/middleman/core_extensions/sitemap.rb @@ -12,12 +12,12 @@ module Middleman::CoreExtensions::Sitemap module InstanceMethods def initialize super - - file_changed do |file| + + file_changed %r{^source/} do |file| sitemap.touch_file(file) end - - file_deleted do |file| + + file_deleted %r{^source/} do |file| sitemap.remove_file(file) end end