Skip to content

Instantly share code, notes, and snippets.

@tatey
Created August 18, 2010 12:12
Show Gist options
  • Select an option

  • Save tatey/534496 to your computer and use it in GitHub Desktop.

Select an option

Save tatey/534496 to your computer and use it in GitHub Desktop.
require 'fileutils'
module Jekyll
class CleanHook < Hook
sequences :pre
def pre(site)
FileUtils.rm_r(site.dest, :force => true) if File.directory?(site.dest)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment