Skip to content

Instantly share code, notes, and snippets.

@miyagawa
Created February 26, 2014 20:01
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 miyagawa/9237290 to your computer and use it in GitHub Desktop.
Save miyagawa/9237290 to your computer and use it in GitHub Desktop.
diff --git a/Rakefile b/Rakefile
index adc9079..60348dd 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,9 +1,13 @@
ENV['TZ'] = "America/Los_Angeles"
require 'erb'
+require 'fileutils'
desc "build static files"
task :build do |t|
system "bundle exec jekyll build"
+ time = Time.now.to_i
+ system "find _site -name \\*.html | xargs perl -i -nlpe 's/screen\\.css/screen-#{time}.css/'"
+ FileUtils.cp("_site/css/screen.css", "_site/css/screen-#{time}.css")
end
desc "push site content to the production environment"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment