0

I am trying to migrate a Tumblr blog to a Jekyll Blog and I am using the migration code provided by Jekyll here: http://import.jekyllrb.com/docs/tumblr/. It is migrating everything except photos in photo posts. Am I missing something with this specific migrator or is there a better way to do this?

$ ruby -rubygems -e 'require "jekyll-import";
JekyllImport::Importers::Tumblr.run({
  "url"            => "http://myblog.tumblr.com",
  "format"         => "html", # or "md"
  "grab_images"    => true,  # whether to download images as well.
  "add_highlights" => false,  # whether to wrap code blocks (indented 4 spaces) in a Liquid "highlight" tag
  "rewrite_urls"   => false   # whether to write pages that redirect from the old Tumblr paths to the new Jekyll paths
})'
  • 1
    There is an [open issue](https://github.com/jekyll/jekyll-import/pull/114) which looks like a possible cause. As it has been sitting open for a while I'm going to take a look. – David Hutchison Jun 01 '14 at 20:37

1 Answers1

2

As in my comment, there is a known issue importing pages which contain multiple images. I have taken a look at the issue and done a little work on a fix, with the hope this is accepted in the project.

In the mean time; if you are able to use bundler with a local gem to execute the command, my fork of the project contains the fix (which I've checked works against your tumbler site).

My test Gemfile is:

source 'https://rubygems.org'
gem 'github-pages'
gem 'stringex'
gem 'jekyll-import', :path => '/Users/david/Development/Local Projects/jekyll-import'
gem 'jekyll-sitemap'

The command, once bundler is installed and the Gemfile configured, would be:

bundle exec ruby -rubygems -e 'require "jekyll-import";
JekyllImport::Importers::Tumblr.run({
  "url"            => "http://mysite.tumblr.com",
  "format"         => "html", # or "md"
  "grab_images"    => true,  # whether to download images as well.
  "add_highlights" => false,  # whether to wrap code blocks (indented 4 spaces) in a Liquid "highlight" tag
  "rewrite_urls"   => false   # whether to write pages that redirect from the old Tumblr paths to the new Jekyll paths
})'
Community
  • 1
  • 1
David Hutchison
  • 2,343
  • 2
  • 19
  • 24