Skip to content

Instantly share code, notes, and snippets.

@Najaf
Created February 10, 2014 09:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Najaf/8912975 to your computer and use it in GitHub Desktop.
Save Najaf/8912975 to your computer and use it in GitHub Desktop.
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