Allow plugins to modify the obsolete files. (#6502)

Merge pull request 6502
This commit is contained in:
Jordon Bedwell 2017-10-30 13:54:06 -05:00 committed by jekyllbot
parent cc89a838f5
commit aa959cef8a
2 changed files with 6 additions and 1 deletions

View File

@ -24,7 +24,9 @@ module Jekyll
#
# Returns an Array of the file and directory paths
def obsolete_files
(existing_files - new_files - new_dirs + replaced_files).to_a
out = (existing_files - new_files - new_dirs + replaced_files).to_a
Jekyll::Hooks.trigger :clean, :on_obsolete, out
out
end
# Private: The metadata file storing dependency tree and build history

View File

@ -39,6 +39,9 @@ module Jekyll
:post_render => [],
:post_write => [],
},
:clean => {
:on_obsolete => [],
},
}
# map of all hooks and their priorities