Merge pull request #176 from bhollis/master
A slight speedup in the sitemap extension by only scanning the source directory
This commit is contained in:
commit
562f9259b7
2 changed files with 5 additions and 5 deletions
|
@ -52,7 +52,7 @@ module Middleman::CoreExtensions::FrontMatter
|
|||
class FrontMatter
|
||||
class << self
|
||||
def matcher
|
||||
%r{source/.*\.html}
|
||||
%r{^source/.*\.html}
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue