Created
May 18, 2013 19:55
-
-
Save bakins/5605592 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| 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