File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
lib/jekyll-import/importers Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -213,12 +213,12 @@ def self.rewrite_urls_and_redirects(posts)
213213 urls = Hash [ posts . map { |post |
214214 # Create an initial empty file for the post so that
215215 # we can instantiate a post object.
216+ File . write ( "_posts/tumblr/#{ post [ :name ] } " , "" )
216217 tumblr_url = URI . parse ( URI . encode ( post [ :slug ] ) ) . path
217218 jekyll_url = if Jekyll . const_defined? :Post
218- File . open ( "_posts/tumblr/#{ post [ :name ] } " , "w" ) { |f | f . puts }
219219 Jekyll ::Post . new ( site , Dir . pwd , "" , "tumblr/" + post [ :name ] ) . url
220220 else
221- Jekyll ::Document . new ( File . expand_path ( "tumblr/#{ post [ :name ] } " ) , site : site , collection : site . posts ) . url
221+ Jekyll ::Document . new ( File . expand_path ( "_posts/ tumblr/#{ post [ :name ] } " ) , site : site , collection : site . posts ) . url
222222 end
223223 redirect_dir = tumblr_url . sub ( /\/ / , "" ) + "/"
224224 FileUtils . mkdir_p redirect_dir
You can’t perform that action at this time.
0 commit comments