Created
February 10, 2014 09:36
-
-
Save Najaf/8912975 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'fileutils' | |
# constants for site generation | |
PUBLIC_DIR = 'public/' | |
CONTENT_DIR = 'content/' | |
LAYOUT = 'views/layout.erb' | |
namespace :site do | |
task :clear do | |
FileUtils.rm_rf "#{PUBLIC_DIR}/*" | |
end | |
task :generate => :clear do | |
Site.generate source: CONTENT_DIR, target: PUBLIC_DIR, layout: LAYOUT | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment