aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrandon Mathis <brandon@imathis.com>2013-04-09 11:48:16 -0500
committerBrandon Mathis <brandon@imathis.com>2013-04-09 11:48:16 -0500
commit1bd2b62a80f3a7be330cb9600a2206a678e6863d (patch)
tree27ba8e32801bd43fa6180aacc7b4000b72c9ca93
parentafca876bd46f13002119c6a342ff75c4db28ac0b (diff)
downloadmy_new_personal_website-1bd2b62a80f3a7be330cb9600a2206a678e6863d.tar.xz
my_new_personal_website-1bd2b62a80f3a7be330cb9600a2206a678e6863d.zip
Added support for deploying to github.io
Diffstat (limited to '')
-rw-r--r--Rakefile6
1 files changed, 3 insertions, 3 deletions
diff --git a/Rakefile b/Rakefile
index 471b2277..a57a56f6 100644
--- a/Rakefile
+++ b/Rakefile
@@ -304,11 +304,11 @@ task :setup_github_pages, :repo do |t, args|
repo_url = args.repo
else
puts "Enter the read/write url for your repository"
- puts "(For example, 'git@github.com:your_username/your_username.github.com)"
+ puts "(For example, 'git@github.com:your_username/your_username.github.io)"
repo_url = get_stdin("Repository url: ")
end
user = repo_url.match(/:([^\/]+)/)[1]
- branch = (repo_url.match(/\/[\w-]+\.github\.com/).nil?) ? 'gh-pages' : 'master'
+ branch = (repo_url.match(/\/[\w-]+\.github\.(?:io|com)/).nil?) ? 'gh-pages' : 'master'
project = (branch == 'gh-pages') ? repo_url.match(/\/([^\.]+)/)[1] : ''
unless (`git remote -v` =~ /origin.+?octopress(?:\.git)?/).nil?
# If octopress is still the origin remote (from cloning) rename it to octopress
@@ -328,7 +328,7 @@ task :setup_github_pages, :repo do |t, args|
end
end
end
- url = "http://#{user}.github.com"
+ url = "http://#{user}.github.io"
url += "/#{project}" unless project == ''
jekyll_config = IO.read('_config.yml')
jekyll_config.sub!(/^url:.*$/, "url: #{url}")