put the Cleaner instance in a `Site#site_cleaner` method

This commit is contained in:
maul.esel 2013-08-19 20:15:54 +02:00
parent 0b3005b3b4
commit d28858a9e9
1 changed files with 6 additions and 4 deletions

View File

@ -3,7 +3,7 @@ module Jekyll
attr_accessor :config, :layouts, :posts, :pages, :static_files,
:categories, :exclude, :include, :source, :dest, :lsi, :pygments,
:permalink_style, :tags, :time, :future, :safe, :plugins, :limit_posts,
:show_drafts, :keep_files, :baseurl, :site_cleaner
:show_drafts, :keep_files, :baseurl
attr_accessor :converters, :generators
@ -87,8 +87,6 @@ module Jekyll
self.converters = instantiate_subclasses(Jekyll::Converter)
self.generators = instantiate_subclasses(Jekyll::Generator)
self.site_cleaner = Cleaner.new(self)
end
# Internal: Setup the plugin search path
@ -228,7 +226,7 @@ module Jekyll
#
# Returns nothing.
def cleanup
self.site_cleaner.cleanup!
site_cleaner.cleanup!
end
# Write static files, pages, and posts.
@ -386,5 +384,9 @@ module Jekyll
limit = self.posts.length < limit_posts ? self.posts.length : limit_posts
self.posts = self.posts[-limit, limit]
end
def site_cleaner
@site_cleaner ||= Cleaner.new(self)
end
end
end