Skip to content

Instantly share code, notes, and snippets.

@bakins
Created May 18, 2013 19:55
Show Gist options
  • Select an option

  • Save bakins/5605592 to your computer and use it in GitHub Desktop.

Select an option

Save bakins/5605592 to your computer and use it in GitHub Desktop.
desc "Generate jekyll site"
task :generate do
raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(source_dir)
puts "## Generating Site with Jekyll"
system "bundle exec compass compile --css-dir #{source_dir}/stylesheets"
system "bundle exec jekyll"
Find.find "public" do |path|
if FileTest.file?(path) and path.match(/\.(css|js|html|xml|txt)$/)
system "gzip -c #{path} > #{path}.gz"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment