class Middleman::Sitemap::Extensions::OnDisk
def touch_file(file, rebuild=true)
-
(Boolean)
-
Parameters:
-
file
(String
) --
def touch_file(file, rebuild=true) return false if file == @app.source_dir || File.directory?(file) path = @sitemap.file_to_path(file) return false unless path ignored = @app.ignored_sitemap_matchers.any? do |name, callback| callback.call(file, path) end @file_paths_on_disk << file unless ignored # Rebuild the sitemap any time a file is touched # in case one of the other manipulators # (like asset_hash) cares about the contents of this file, # whether or not it belongs in the sitemap (like a partial) @sitemap.rebuild_resource_list!(:touched_file) if rebuild end