diff options
author | Brandon Mathis <brandon@imathis.com> | 2013-04-09 11:48:16 -0500 |
---|---|---|
committer | Brandon Mathis <brandon@imathis.com> | 2013-04-09 11:48:16 -0500 |
commit | 1bd2b62a80f3a7be330cb9600a2206a678e6863d (patch) | |
tree | 27ba8e32801bd43fa6180aacc7b4000b72c9ca93 | |
parent | afca876bd46f13002119c6a342ff75c4db28ac0b (diff) | |
download | my_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-- | Rakefile | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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}") |