Skip to content

Commit

Permalink
Merge pull request imathis#1331 from Darkhogg/patch-1
Browse files Browse the repository at this point in the history
Fixed setup_github_pages failing and not properly writing url to _config.yml
  • Loading branch information
parkr committed Oct 23, 2014
2 parents c434de5 + 631069f commit c6c5b74
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,9 @@ task :setup_github_pages, :repo do |t, args|
end
end
end
url = blog_url(user, project)
jekyll_config = IO.read('_config.yml')
jekyll_config.sub!(/^url:.*$/, "url: #{blog_url(user, project)}")
jekyll_config.sub!(/^url:.*$/, "url: #{url}")
File.open('_config.yml', 'w') do |f|
f.write jekyll_config
end
Expand Down Expand Up @@ -391,7 +392,7 @@ def blog_url(user, project)
url = if File.exists?('source/CNAME')
"http://#{IO.read('source/CNAME').strip}"
else
"http://#{user}.github.io"
"http://#{user.downcase}.github.io"
end
url += "/#{project}" unless project == ''
url
Expand Down

0 comments on commit c6c5b74

Please sign in to comment.