S9Y Database

额外依赖项

此导入器需要以下额外库文件。

可以通过运行 gem install GEM_NAME 分别安装所需的 gem,或者使用下面这条命令一次性全部安装: gem install nokogiri safe_yaml sequel unidecode

此导入器仅会转换你的文章并生成 YAML 前置元数据(front-matter)。 它不会导入任何布局、样式或外部文件(如图片、CSS 等)。

调用方式

调用导入器的示例命令:

jekyll-import s9ydatabase --dbname DB --socket SOCKET --user USER --password PW --host HOST --port PORT --table_prefix PREFIX --clean_entities --comments --categories --tags --drafts --markdown --permalinks --excerpt_separator --includeentry --imgfig --linebreak --relative
选项 <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

Custom database port connect to.

默认值:  3306
--table_prefix PREFIX

Table prefix name.

默认值:  'serendipity_'
--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
--drafts

Whether to export drafts as well.

默认值:  true
--markdown

convert into markdown format.

默认值:  false
--permalinks

preserve S9Y permalinks.

默认值:  false
--excerpt_separator

Demarkation for excerpts.

默认值:  ''
--includeentry

Replace macros from the includeentry plugin.

默认值:  false
--imgfig

Replace nested img and youtube divs with HTML figure tags.

默认值:  true
--linebreak

Line break processing: wp, nokogiri, ignore.

默认值:  wp
--relative

Convert links with this prefix to relative.

默认值:  nil

迁移选项

此导入器现在支持两个选项,可帮助你将博客迁移到新的托管服务提供商。

扩展选项

此导入器现在支持一些最常见的 S9Y 插件。

查看源码 →