From 5c275542c350baeffa0b9e6656d418570cdbe4b0 Mon Sep 17 00:00:00 2001 From: fhemberger Date: Mon, 12 Sep 2011 19:46:11 +0200 Subject: [PATCH 1/6] Copy dotfiles also for subdirectories --- Rakefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Rakefile b/Rakefile index 5be7910..83e1a72 100644 --- a/Rakefile +++ b/Rakefile @@ -204,10 +204,10 @@ end desc "copy dot files for deployment" task :copydot do - exclusions = [".", "..", ".DS_Store"] - Dir["#{source_dir}/.*"].each do |file| - if !File.directory?(file) && !exclusions.include?(file) - cp(file, "#{public_dir}"); + exclusions = [".", "..", ".DS_Store"] + Dir["#{source_dir}/**/.*"].each do |file| + if !File.directory?(file) && !exclusions.include?(file) + cp(file, file.gsub(/#{source_dir}/, "#{public_dir}")); end end end From 960a57c256c9cef65d0f9cd6f3563793fcb845bb Mon Sep 17 00:00:00 2001 From: fhemberger Date: Mon, 12 Sep 2011 19:49:18 +0200 Subject: [PATCH 2/6] Generate site before deploying, execute tasks in sequence --- Rakefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index 83e1a72..75b4d2f 100644 --- a/Rakefile +++ b/Rakefile @@ -199,7 +199,8 @@ end ############## desc "Default deploy task" -multitask :deploy => [:copydot, "#{deploy_default}"] do +task :deploy do + [:generate, :copydot, "#{deploy_default}"].each { |t| Rake::Task[t].execute } end desc "copy dot files for deployment" From 04973e0948670a643368ee973cb24a7fdb0b2b62 Mon Sep 17 00:00:00 2001 From: fhemberger Date: Mon, 12 Sep 2011 20:48:26 +0200 Subject: [PATCH 3/6] Move generate + deploy to separate task --- Rakefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index 75b4d2f..f67596f 100644 --- a/Rakefile +++ b/Rakefile @@ -200,7 +200,12 @@ end desc "Default deploy task" task :deploy do - [:generate, :copydot, "#{deploy_default}"].each { |t| Rake::Task[t].execute } + [:copydot, "#{deploy_default}"].each { |t| Rake::Task[t].execute } +end + +desc "Generate website and deploy" +task :gen_deploy do + [:generate, :deploy].each { |t| Rake::Task[t].execute } end desc "copy dot files for deployment" From 565648300b3c79330d4f3b75161ebefce9414e04 Mon Sep 17 00:00:00 2001 From: fhemberger Date: Mon, 12 Sep 2011 21:36:14 +0200 Subject: [PATCH 4/6] Fix an issue in 'watch' and 'preview' where main process is terminated with child processes still running --- Rakefile | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/Rakefile b/Rakefile index f67596f..881929a 100644 --- a/Rakefile +++ b/Rakefile @@ -60,12 +60,11 @@ task :watch do compassPid = Process.spawn("compass watch") trap("INT") { - Process.kill(9, jekyllPid) - Process.kill(9, compassPid) - exit 0 + [jekyllPid, compassPid].each { |pid| Process.kill(9, pid) rescue Errno::ESRCH } + exit 0 } - Process.wait + [jekyllPid, compassPid].each { |pid| Process.wait(pid) } end desc "preview the site in a web browser" @@ -77,13 +76,11 @@ task :preview do rackupPid = Process.spawn("rackup --port #{server_port}") trap("INT") { - Process.kill(9, jekyllPid) - Process.kill(9, compassPid) - Process.kill(9, rackupPid) - exit 0 + [jekyllPid, compassPid, rackupPid].each { |pid| Process.kill(9, pid) rescue Errno::ESRCH } + exit 0 } - Process.wait + [jekyllPid, compassPid, rackupPid].each { |pid| Process.wait(pid) } end # usage rake new_post[my-new-post] or rake new_post['my new post'] or rake new_post (defaults to "new-post") From 48cd2793cf40c634ccee89d5a155efdb6851201d Mon Sep 17 00:00:00 2001 From: Brandon Mathis Date: Mon, 12 Sep 2011 14:51:49 -0500 Subject: [PATCH 5/6] added itegration to gen_deploy --- Rakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index 881929a..95e95c7 100644 --- a/Rakefile +++ b/Rakefile @@ -202,7 +202,7 @@ end desc "Generate website and deploy" task :gen_deploy do - [:generate, :deploy].each { |t| Rake::Task[t].execute } + [:integrate, :generate, :deploy].each { |t| Rake::Task[t].execute } end desc "copy dot files for deployment" From 728bdad5ca20de107e88a9cbd75757126a2b8bd5 Mon Sep 17 00:00:00 2001 From: Brandon Mathis Date: Sat, 17 Sep 2011 09:40:14 -0500 Subject: [PATCH 6/6] removes index.html from canonical urls. closes #153 --- .themes/classic/source/_includes/head.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.themes/classic/source/_includes/head.html b/.themes/classic/source/_includes/head.html index d174112..be371e9 100644 --- a/.themes/classic/source/_includes/head.html +++ b/.themes/classic/source/_includes/head.html @@ -18,8 +18,8 @@ {% if page.keywords %} {% endif %} - - + {% capture canonical %}{{ site.url }}{% if site.permalink contains '.html' %}{{ page.url }}{% else %}{{ page.url | remove:'index.html' }}{% endif %}{% endcapture %} +