Use Dir.pwd instead of "." as the source argument to Post.new, since
this has historically supplied an absolute path in this call.
This commit is contained in:
parent
fbc9d0c663
commit
c95c5e3b7d
|
@ -121,7 +121,7 @@ module Jekyll
|
||||||
# we can instantiate a post object.
|
# we can instantiate a post object.
|
||||||
File.open("_posts/tumblr/#{post[:name]}", "w")
|
File.open("_posts/tumblr/#{post[:name]}", "w")
|
||||||
tumblr_url = URI.parse(post[:slug]).path
|
tumblr_url = URI.parse(post[:slug]).path
|
||||||
jekyll_url = Jekyll::Post.new(site, ".", "", "tumblr/" + post[:name]).url
|
jekyll_url = Jekyll::Post.new(site, Dir.pwd, "", "tumblr/" + post[:name]).url
|
||||||
redirect_dir = tumblr_url.sub(/\//, "") + "/"
|
redirect_dir = tumblr_url.sub(/\//, "") + "/"
|
||||||
FileUtils.mkdir_p redirect_dir
|
FileUtils.mkdir_p redirect_dir
|
||||||
File.open(redirect_dir + "index.html", "w") do |f|
|
File.open(redirect_dir + "index.html", "w") do |f|
|
||||||
|
|
Loading…
Reference in New Issue