Movable Type Importer
This importer depends on the following third-party gems:
- mysql2
- pg
- safe_yaml
- sequel
- sqlite3
gem install GEM_NAME
or install the required gems in a batch by running the following snippet:
gem install mysql2 pg safe_yaml sequel sqlite3
Invocation
Sample snippet to invoke the importer:
jekyll import mt --dbname DB --user USER --engine ENGINE --password PW --host HOST --port PORT --blog_id ID --categories --src_encoding ENCODING --dest_encoding ENCODING --comments
Option <PARAM> | Description | ||
---|---|---|---|
--dbname DB |
Database name. |
||
--user USER |
Database user name. |
||
--engine ENGINE |
Database engine (‘mysql’ or ‘postgres’). |
Default: 'mysql' |
|
--password PW |
Database user’s password. |
Default: '' |
|
--host HOST |
Database host name. |
Default: 'localhost' |
|
--port PORT |
Custom database port connect to. |
Default: null |
|
--blog_id ID |
Specify a single Movable Type blog ID to import. |
Default: null (all blogs) |
|
--categories |
When true, save post’s categories in its YAML front matter. |
Default: true |
|
--src_encoding ENCODING |
Encoding of strings from database. |
Default: UTF-8 |
|
--dest_encoding ENCODING |
Encoding of output strings. |
Default: UTF-8 |
|
--comments |
When true, output comments in |
Default: false |
Posts will be generated and placed in _posts
directory.
comments
, which defaults to false, control the generation of comments. If
comments
is set to true, posts will be generated and placed in _comments
directory.
All of the posts and comments will include post_id
in YAML front matter to
link a post and its comments.
You can use the fork of mt-static-comments to include statically generate comments in your post.