Merge pull request #1331 from Darkhogg/patch-1
Fixed setup_github_pages failing and not properly writing url to _config.yml
This commit is contained in:
commit
c6c5b74f4d
5
Rakefile
5
Rakefile
@ -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
|
||||
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user