aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Slifka <robert.slifka@gmail.com>2013-08-21 16:42:03 -0700
committerRob Slifka <robert.slifka@gmail.com>2013-08-21 16:42:03 -0700
commitdef01cb4441a08a4dca4b4be4d44c8684857f648 (patch)
tree47244429b3d933150d05a494caddf1bb26da6d42
parent9cf6b5ff8303522648ef01a510cca43c0563887c (diff)
downloadmy_new_personal_website-def01cb4441a08a4dca4b4be4d44c8684857f648.tar.xz
my_new_personal_website-def01cb4441a08a4dca4b4be4d44c8684857f648.zip
Use source/CNAME (if it exists) to set _config.yml url property
Diffstat (limited to '')
-rw-r--r--Rakefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/Rakefile b/Rakefile
index f3ada93d..f16a5f40 100644
--- a/Rakefile
+++ b/Rakefile
@@ -337,7 +337,11 @@ task :setup_github_pages, :repo do |t, args|
end
end
end
- url = "http://#{user}.github.io"
+ url = if File.exists?('source/CNAME')
+ "http://#{IO.read('source/CNAME').strip}"
+ else
+ "http://#{user}.github.io"
+ end
url += "/#{project}" unless project == ''
jekyll_config = IO.read('_config.yml')
jekyll_config.sub!(/^url:.*$/, "url: #{url}")