aboutsummaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
authorBrandon Mathis <brandon@imathis.com>2011-08-10 18:14:56 -0400
committerBrandon Mathis <brandon@imathis.com>2011-08-10 18:15:10 -0400
commit0e072543dad52537ad2f445b5c718488c379144c (patch)
tree7828aaa7f256a70d9a62bac01b5b0a3e74b5fd84 /Rakefile
parent9c2f64d20cd881054abe09247c26162118afe541 (diff)
downloadmy_new_personal_website-0e072543dad52537ad2f445b5c718488c379144c.tar.xz
my_new_personal_website-0e072543dad52537ad2f445b5c718488c379144c.zip
added support for preserving customized source/index.html during template updates. Moved the blog index code to a partial in source/_includes/blog_index.html
Diffstat (limited to '')
-rw-r--r--Rakefile5
1 files changed, 5 insertions, 0 deletions
diff --git a/Rakefile b/Rakefile
index 86e07b5d..dd309637 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,6 +1,10 @@
require "rubygems"
require "bundler/setup"
+# If you customize your site's index page setting custom_index to true
+# will preserve your changes when running `rake update_source`
+custom_index = false
+
## -- Rsync Deploy config -- ##
# Be sure your public key is listed in your server's ~/.ssh/authorized_keys file
ssh_user = "user@domain.com"
@@ -150,6 +154,7 @@ task :update_source, :theme do |t, args|
system "mkdir -p #{source_dir}; cp -R #{themes_dir}/"+theme+"/source/. #{source_dir}"
system "cp -Rn #{source_dir}.old/. #{source_dir}"
system "cp -Rf #{source_dir}.old/_includes/custom/. #{source_dir}/_includes/custom/"
+ system "cp -Rf #{source_dir}.old/index.html #{source_dir}" if custom_index
puts "## Updated #{source_dir} ##"
end