From 5080e8707770be51b260f046f3828e403698e853 Mon Sep 17 00:00:00 2001 From: Alvaro Garcia Date: Mon, 13 Jul 2015 08:24:55 +0200 Subject: [PATCH] create task ignore for faster site generation --- Rakefile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Rakefile b/Rakefile index 9367ea1eae4..393a1e2b65e 100644 --- a/Rakefile +++ b/Rakefile @@ -178,6 +178,15 @@ task :clean do rm_rf [Dir.glob(".pygments-cache/**"), Dir.glob(".gist-cache/**"), Dir.glob(".sass-cache/**"), "source/stylesheets/screen.css"] end +desc "Cleans all *.markdown files for a faster site generation" +# Suggestion for a faster site generation explained in http://alvarogarcia7.github.io/blog/2015/07/13/faster-site-generation-for-octopress-2/ +task :ignore do + cd "#{source_dir}/#{posts_dir}" + system "git update-index --assume-unchanged $(ls *.markdown)" + system "rm $(ls *.markdown)" +end + + desc "Move sass to sass.old, install sass theme updates, replace sass/custom with sass.old/custom" task :update_style, :theme do |t, args| theme = args.theme || 'classic'