WordPress
额外依赖项
此导入器需要以下额外库文件。
可以通过运行 gem install GEM_NAME 分别安装所需的 gem,或者使用下面这条命令一次性全部安装:
gem install safe_yaml sequel unidecode
此导入器仅会转换你的文章并生成 YAML 前置元数据(front-matter)。 它不会导入任何布局、样式或外部文件(如图片、CSS 等)。
调用方式
调用导入器的示例命令:
jekyll-import wordpress --dbname DB --socket SOCKET --user USER --password PW --host HOST --port PORT --table_prefix PREFIX --site_prefix PREFIX --clean_entities --comments --categories --tags --more_excerpt --more_anchor --status STATUS,STATUS2
| 选项 <PARAM> | 说明 | ||
|---|---|---|---|
--dbname DB |
Database name. |
默认值: '' |
|
--socket SOCKET |
Database socket. |
默认值: '' |
|
--user USER |
Database user name. |
默认值: '' |
|
--password PW |
Database user’s password. |
默认值: '' |
|
--host HOST |
Database host name. |
默认值: 'localhost' |
|
--port PORT |
Database port number. |
默认值: '' |
|
--table_prefix PREFIX |
Table prefix name. |
默认值: 'wp_' |
|
--site_prefix PREFIX |
Site prefix name. |
默认值: '' |
|
--clean_entities |
Whether to clean entities. |
默认值: true |
|
--comments |
Whether to import comments. |
默认值: true |
|
--categories |
Whether to import categories. |
默认值: true |
|
--tags |
Whether to import tags. |
默认值: true |
|
--more_excerpt |
Whether to use more excerpt. |
默认值: true |
|
--more_anchor |
Whether to use more anchor. |
默认值: true |
|
--status STATUS,STATUS2 |
Array of allowed statuses (‘publish’, ‘draft’, ‘private’, ‘revision’). |
默认值: ['publish'] |
|