博客导入指南

Getting started

If you’re switching to Jekyll from another blogging system, Jekyll’s importers can help you with the move. Most methods listed on this page require read access to the database from your old system to generate posts for Jekyll. Each method generates .markdown posts in the _posts directory based on the entries in the foreign system.

Other Systems

If you have a system for which there is currently no migrator, consider writing one and sending us a pull request.

Installation

Because the importers have many of their own dependencies, they are made available via a separate gem called jekyll-import. To use them, all you need to do is install the gem, and they will become available as part of Jekyll’s standard command line interface.

$ gem install jekyll-import
Jekyll-import requires you to manually install some dependencies.

Most importers require one or more dependencies. In order to keep jekyll-import's footprint small, we don't bundle the gem with every plausible dependency. Instead, you will see a nice error message describing any missing dependency and how to install it. If you're especially savvy, take a look at the require_deps method in your chosen importer to install all of the deps in one go.

Usage

You should now be all set to run the importers with the following incantation:

$ ruby -r rubygems -e 'require "jekyll-import";
    JekyllImport::Importers::MyImporter.run({
      # options for this importer
    })'

Where MyImporter is the name of the specific importer.

Note: Always double-check migrated content

Importers may not distinguish between published or private posts, so you should always check that the content Jekyll generates for you appears as you intended.