将Tumblr迁移到Jekyll而不上传照片帖子

时间:2014-05-31 22:28:20

标签: ruby-on-rails tumblr jekyll

我正在尝试将Tumblr博客迁移到Jekyll博客,我正在使用Jekyll提供的迁移代码:http://import.jekyllrb.com/docs/tumblr/。除了照片帖子中的照片外,它正在迁移所有内容。我错过了这个特定迁移器的东西,还是有更好的方法来做到这一点?

$ 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 个答案:

答案 0 :(得分:2)

在我的评论中,有known issue个导入页面,其中包含多个图像。我已经看了一下这个问题,并在修复方面做了一些工作,希望在项目中接受这个。

同时;如果您能够使用bundlerlocal gem来执行命令,则项目的my fork包含修复程序(我已经检查过您的不倒翁网站)。< / p>

我的测试Gemfile是:

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

一旦安装了Bundler并配置了Gemfile,该命令就是:

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
})'