S9Y Database
Additional Dependencies
This importer requires the following additional libraries.
You may install the needed gems individually by running gem install GEM_NAME
or install all of them
with a single invocation:gem install nokogiri safe_yaml sequel unidecode
This importer only converts your posts and creates YAML front-matter. It does not import any layouts, styling, or external files (images, CSS, etc).
Invocation
Sample snippet to invoke the importer:
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
Migration Options
This importer now supports two options to help migrate your blog to a new hosting provider.
-
relative
Set this to your URL prefix to convert all the absolute URLs in your posts to relative. For example, when set to
myhost.com/blog
, URLs likehttp://myhost.com/blog/lifestyle/7-lucky-post.html
will be converted to/lifestyle/7-lucky-post.html
. Note that you should not include the trailing/
slash, and that https: is not yet supported. -
linebreak
If you used a formatting extension, this option might be useful. Use one of the following values to try and replicate your post line breaks as closely as possible:
- wp (the default)
Replicate the Wordpress line break behavior, the default for S9Y.
- nokogiri
Uses the
nokogiri
gem to interpret entries as XHTML formatted. If you write HTML entries, this preserves the HTML line breaks. - ignore
This option does not process the entries at all, but imports them into Jekyll verbatim. This may be useful if you wrote your entries in a Jekyll-compatible format.
- wp (the default)
Extension Options
This importer now supports some of the most common S9Y plugins.
-
includeentry
Set this true to transclude entries like the
includeentry
plugin. The current, static content of the entry will be included. Future updates will not be synced. -
excerpt_separator
S9Y treats the regular post body as an excerpt, displaying the extended body only in the post details. Jekyll only shows the first paragraph of the post as an excerpt. This option allows you to restore the S9Y behavior: posts with extended body will have the specified separator added to their front matter, and you can modify your index layout to show the excerpts.
-
imgfig
By default, this converts references to S9Y's media library into HTML
figure
tags. Set it tofalse
to keep the original references, which you'll have to update manually.