diff --git a/docs/_config.yml b/docs/_config.yml index bc0319c1..8dfea987 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -12,6 +12,17 @@ collections: output: true importers: output: true + permalink: /docs/:path/ + +defaults: + - scope: + type: docs + values: + layout: docs + - scope: + type: importers + values: + layout: importer sass: style: compressed diff --git a/docs/_importers/behance.md b/docs/_importers/behance.md index 0163cc3f..50932a78 100644 --- a/docs/_importers/behance.md +++ b/docs/_importers/behance.md @@ -1,21 +1,7 @@ --- -layout: docs title: Behance importer: true prev_section: usage link_source: behance next_section: blogger -permalink: /docs/behance/ --- - -To import your posts from your [Behance](http://behance.com), generate an API token for your user account and run: - -{% highlight bash %} -$ ruby -r rubygems -e 'require "jekyll-import"; - JekyllImport::Importers::Behance.run({ - "user" => "my_username", - "api_token" => "my_api_token" - })' -{% endhighlight %} - -Both `user` and `api_token` are required. diff --git a/docs/_importers/blogger.md b/docs/_importers/blogger.md index 15519bac..83263a97 100644 --- a/docs/_importers/blogger.md +++ b/docs/_importers/blogger.md @@ -1,29 +1,13 @@ --- -layout: docs -title: Blogger importer: true prev_section: behance link_source: blogger next_section: csv -permalink: /docs/blogger/ ---- - -To import your posts from your [Blogger](https://www.blogger.com/), -you first have to [export the blog][export-blogger-xml] -to a XML file (`blog-MM-DD-YYYY.xml`), -and run: -{% highlight bash %} -$ ruby -r rubygems -e 'require "jekyll-import"; - JekyllImport::Importers::Blogger.run({ - "source" => "/path/to/blog-MM-DD-YYYY.xml", - "no-blogger-info" => false, # not to leave blogger-URL info (id and old URL) in the front matter - "replace-internal-link" => false, # replace internal links using the post_url liquid tag. - })' -{% endhighlight %} +prereq_info: |- + To import your posts from Blogger, you have to first [export the blog][export-blogger-xml] + to an XML file (`blog-MM-DD-YYYY.xml`). -The only required field is `source`. -The other fields default to their above values. + [export-blogger-xml]: https://support.google.com/blogger/answer/97416 "Export or import your blog - Blogger Help" +--- "Labels" will be included in export as "Tags". - -[export-blogger-xml]: https://support.google.com/blogger/answer/97416 "Export or import your blog - Blogger Help" diff --git a/docs/_importers/csv.md b/docs/_importers/csv.md index 76eb1304..ebb7fc17 100644 --- a/docs/_importers/csv.md +++ b/docs/_importers/csv.md @@ -1,21 +1,10 @@ --- -layout: docs title: CSV prev_section: blogger link_source: csv next_section: drupal6 -permalink: /docs/csv/ --- -To import your posts from a CSV file, run: - -{% highlight bash %} -$ ruby -r rubygems -e 'require "jekyll-import"; - JekyllImport::Importers::CSV.run({ - "file" => "my_posts.csv" - })' -{% endhighlight %} - Your CSV file will be read in with the following columns: 1. title @@ -24,14 +13,6 @@ Your CSV file will be read in with the following columns: 4. published_at 5. filter (e.g. markdown, textile) -If you wish to specify custom front matter for each of your posts, you -can use the `no-front-matter` option to prevent the default front matter -from being written to the imported files: - -{% highlight bash %} -$ ruby -r rubygems -e 'require "jekyll-import"; - JekyllImport::Importers::CSV.run({ - "file" => "my_posts.csv", - "no-front-matter" => true - })' -{% endhighlight %} +If you wish to specify custom front matter for each of your posts, you can use +the `--no-front-matter` option to prevent the default front matter from being +written to the imported files. diff --git a/docs/_importers/dotclear.md b/docs/_importers/dotclear.md index d05d3a5e..1273266e 100644 --- a/docs/_importers/dotclear.md +++ b/docs/_importers/dotclear.md @@ -1,18 +1,6 @@ --- -layout: docs title: Dotclear prev_section: csv link_source: dotclear next_section: drupal6 -permalink: /docs/dotclear/ --- - -To import your posts from a dotclear file, run: - -{% highlight bash %} -$ ruby -r rubygems -e 'require "jekyll-import"; - JekyllImport::Importers::Dotclear.run({ - "datafile" => "2019-....-backup.txt", - "mediafolder" => "path/to/the/media (media.zip inflated)" - })' -{% endhighlight %} diff --git a/docs/_importers/drupal6.md b/docs/_importers/drupal6.md index 2145ee28..24bd1130 100644 --- a/docs/_importers/drupal6.md +++ b/docs/_importers/drupal6.md @@ -1,43 +1,10 @@ --- -layout: docs title: Drupal 6 prev_section: csv link_source: drupal6 next_section: drupal7 -permalink: /docs/drupal6/ --- -To import your posts from a [Drupal 6](http://drupal.org) installation, run: - -{% highlight bash %} -$ ruby -r rubygems -e 'require "jekyll-import"; - JekyllImport::Importers::Drupal6.run({ - "dbname" => "name", - "user" => "myuser", - "password" => "mypassword", - "host" => "myhost", - "prefix" => "mytableprefix", - "types" => ["blog", "story", "article"] - })' -{% endhighlight %} - -The only required fields are `dbname` and `user`. `password` defaults to `""`, -`host` defaults to `"localhost"`, and `prefix` defaults to `""`. - By default, this will pull in nodes of type `blog`, `story`, and `article`. To specify custom types, you can use the `types` option when you run the -importer: - -{% highlight bash %} -$ ruby -r rubygems -e 'require "jekyll-import"; - JekyllImport::Importers::Drupal6.run({ - "dbname" => "name", - "user" => "myuser", - "password" => "mypassword", - "host" => "myhost", - "prefix" => "mytableprefix", - "types" => ["blog", "post"] - })' -{% endhighlight %} - -That will import nodes of type `blog` and `post` only. +importer to select node types. diff --git a/docs/_importers/drupal7.md b/docs/_importers/drupal7.md index 36a3e86b..eda41315 100644 --- a/docs/_importers/drupal7.md +++ b/docs/_importers/drupal7.md @@ -1,59 +1,10 @@ --- -layout: docs title: Drupal 7 prev_section: drupal6 link_source: drupal7 next_section: drupal8 -permalink: /docs/drupal7/ --- -To import your posts from a [Drupal 7](http://drupal.org) installation, run: - -{% highlight bash %} -$ ruby -r rubygems -e 'require "jekyll-import"; - JekyllImport::Importers::Drupal7.run({ - "dbname" => "name", - "user" => "myuser", - "password" => "mypassword", - "host" => "myhost", - "prefix" => "mytableprefix", - "types" => ["blog", "story", "article"] - })' -{% endhighlight %} - -The only required fields are `dbname` and `user`. `password` defaults to `""`, -`host` defaults to `"localhost"`, and `prefix` defaults to `""`. - By default, this will pull in nodes of type `blog`, `story`, and `article`. To specify custom types, you can use the `types` option when you run the -importer: - -{% highlight bash %} -$ ruby -r rubygems -e 'require "jekyll-import"; - JekyllImport::Importers::Drupal7.run({ - "dbname" => "name", - "user" => "myuser", - "password" => "mypassword", - "host" => "myhost", - "prefix" => "mytableprefix", - "types" => ["blog", "post"] - })' -{% endhighlight %} - -That will import nodes of type `blog` and `post` only. - -The default Drupal 7 expects database to be MySQL. If you want to import posts -from Drupal 7 installation with PostgreSQL define `"engine"` as `"postgresql"`: - -{% highlight bash %} -$ ruby -r rubygems -e 'require "jekyll-import"; - JekyllImport::Importers::Drupal7.run({ - "engine" => "postgresql", - "dbname" => "name", - "user" => "myuser", - "password" => "mypassword", - "host" => "myhost", - "prefix" => "mytableprefix", - "types" => ["blog", "story", "article"] - })' -{% endhighlight %} +importer to select node types. diff --git a/docs/_importers/drupal8.md b/docs/_importers/drupal8.md index b49d174e..dbe599ff 100644 --- a/docs/_importers/drupal8.md +++ b/docs/_importers/drupal8.md @@ -1,59 +1,10 @@ --- -layout: docs title: Drupal 8 prev_section: drupal7 link_source: drupal8 next_section: easyblog -permalink: /docs/drupal8/ --- -To import your posts from a [Drupal 8](http://drupal.org) installation, run: - -{% highlight bash %} -$ ruby -r rubygems -e 'require "jekyll-import"; - JekyllImport::Importers::Drupal8.run({ - "dbname" => "name", - "user" => "myuser", - "password" => "mypassword", - "host" => "myhost", - "prefix" => "mytableprefix", - "types" => ["blog", "story", "article"] - })' -{% endhighlight %} - -The only required fields are `dbname` and `user`. `password` defaults to `""`, -`host` defaults to `"localhost"`, and `prefix` defaults to `""`. - By default, this will pull in nodes of type `blog`, `story`, and `article`. To specify custom types, you can use the `types` option when you run the -importer: - -{% highlight bash %} -$ ruby -r rubygems -e 'require "jekyll-import"; - JekyllImport::Importers::Drupal8.run({ - "dbname" => "name", - "user" => "myuser", - "password" => "mypassword", - "host" => "myhost", - "prefix" => "mytableprefix", - "types" => ["blog", "post"] - })' -{% endhighlight %} - -That will import nodes of type `blog` and `post` only. - -The default Drupal 8 expects database to be MySQL. If you want to import posts -from Drupal 8 installation with PostgreSQL define `"engine"` as `"postgresql"`: - -{% highlight bash %} -$ ruby -r rubygems -e 'require "jekyll-import"; - JekyllImport::Importers::Drupal8.run({ - "engine" => "postgresql", - "dbname" => "name", - "user" => "myuser", - "password" => "mypassword", - "host" => "myhost", - "prefix" => "mytableprefix", - "types" => ["blog", "story", "article"] - })' -{% endhighlight %} +importer to select node types. diff --git a/docs/_importers/easyblog.md b/docs/_importers/easyblog.md index 4bfb6839..08835dad 100644 --- a/docs/_importers/easyblog.md +++ b/docs/_importers/easyblog.md @@ -1,25 +1,6 @@ --- -layout: docs title: EasyBlog prev_section: drupal8 link_source: easyblog next_section: enki -permalink: /docs/easyblog/ --- - -To import your posts from a [EasyBlog](http://stackideas.com/easyblog) installation, run: - -{% highlight bash %} -$ ruby -r rubygems -e 'require "jekyll-import"; - JekyllImport::Importers::Easyblog.run({ - "dbname" => "name", - "user" => "myuser", - "password" => "mypassword", - "host" => "myhost", - "prefix" => "mytableprefix" - })' -{% endhighlight %} - -The only required fields are `dbname` and `user`. `password` defaults to `""`, -`host` defaults to `"localhost"` -`prefix` defaults to `"jos_"`. This will export all articles (in any state). Category and tags will be included in export. diff --git a/docs/_importers/enki.md b/docs/_importers/enki.md index 04e11dc7..b9db6cb5 100644 --- a/docs/_importers/enki.md +++ b/docs/_importers/enki.md @@ -1,23 +1,5 @@ --- -layout: docs -title: Enki prev_section: easyblog link_source: enki next_section: ghost -permalink: /docs/enki/ --- - -To import your posts from a [Enki](https://github.com/xaviershay/enki) installation, run: - -{% highlight bash %} -$ ruby -r rubygems -e 'require "jekyll-import"; - JekyllImport::Importers::Enki.run({ - "dbname" => "name", - "user" => "myuser", - "password" => "mypassword", - "host" => "myhost" - })' -{% endhighlight %} - -The only required fields are `dbname` and `user`. `password` defaults to `""` -and `host` defaults to `"localhost"`. diff --git a/docs/_importers/ghost.md b/docs/_importers/ghost.md index 020435cb..bc930f25 100644 --- a/docs/_importers/ghost.md +++ b/docs/_importers/ghost.md @@ -1,21 +1,10 @@ --- -layout: docs -title: Ghost prev_section: enki link_source: ghost next_section: google_reader -permalink: /docs/ghost/ --- -To import your posts from your self-hosted Ghost instance, you first have to download your ghost.db from your server and run: - -{% highlight bash %} -$ ruby -r rubygems -e 'require "jekyll-import"; - JekyllImport::Importers::Ghost.run({ - "dbfile" => "/path/to/your/ghost.db" - })' -{% endhighlight %} - -There are no required fields. `dbfile` defaults to `"ghost.db"`. - -If you have a Ghost backup file, consider using another tool called [jekyll_ghost_importer](https://github.com/eloyesp/jekyll_ghost_importer) to import your content. It is a separate gem and docs can be found at the link provided. +If you have a Ghost backup file, consider using another tool called +[jekyll_ghost_importer](https://github.com/eloyesp/jekyll_ghost_importer) to +import your content. It is a separate gem and docs can be found at the link +provided. diff --git a/docs/_importers/googlereader.md b/docs/_importers/googlereader.md index e6b1d39a..0cf4a05b 100644 --- a/docs/_importers/googlereader.md +++ b/docs/_importers/googlereader.md @@ -1,19 +1,7 @@ --- -layout: docs title: Google Reader prev_section: enki link_source: google_reader next_section: joomla permalink: /docs/google_reader/ --- - -To import your posts from a [Google Reader](http://reader.google.com) XML dump file, run: - -{% highlight bash %} -$ ruby -r rubygems -e 'require "jekyll-import"; - JekyllImport::Importers::GoogleReader.run({ - "source" => "my_file.xml" - })' -{% endhighlight %} - -The `source` field is required. diff --git a/docs/_importers/joomla.md b/docs/_importers/joomla.md index 98a5f103..a65eccfa 100644 --- a/docs/_importers/joomla.md +++ b/docs/_importers/joomla.md @@ -1,27 +1,5 @@ --- -layout: docs -title: Joomla prev_section: google_reader link_source: joomla next_section: joomla3 -permalink: /docs/joomla/ --- - -To import your posts from a [Joomla](http://joomla.org) installation, run: - -{% highlight bash %} -$ ruby -r rubygems -e 'require "jekyll-import"; - JekyllImport::Importers::Joomla.run({ - "dbname" => "name", - "user" => "myuser", - "password" => "mypassword", - "host" => "myhost", - "port" => portnumber, - "section" => "thesection", - "prefix" => "mytableprefix" - })' -{% endhighlight %} - -The only required fields are `dbname` and `user`. `password` defaults to `""`, -`host` defaults to `"localhost"`, `portnumber` defaults to `3306`, `section` -defaults to `"1"` and `prefix` defaults to `"jos_"`. diff --git a/docs/_importers/joomla3.md b/docs/_importers/joomla3.md index 9857bd90..ee3789de 100644 --- a/docs/_importers/joomla3.md +++ b/docs/_importers/joomla3.md @@ -1,30 +1,9 @@ --- -layout: docs title: Joomla 3 prev_section: joomla link_source: joomla3 next_section: jrnl -permalink: /docs/joomla3/ --- -To import your posts from a [Joomla 3](http://joomla.org) installation, run: - -{% highlight bash %} -$ ruby -r rubygems -e 'require "jekyll-import"; - JekyllImport::Importers::Joomla3.run({ - "dbname" => "name", - "user" => "myuser", - "password" => "mypassword", - "host" => "myhost", - "port" => portnumber, - "category" => category, - "prefix" => "mytableprefix" - })' -{% endhighlight %} - -The only required fields are `dbname`, `prefix` and `user`. `password` defaults to `""`, -`host` defaults to `"localhost"`, `portnumber` defaults to `3306` and `prefix` defaults to -`"jos_"`. - If the `category` numerical field is not filled, all articles will be imported, except the ones that are uncategorized. diff --git a/docs/_importers/jrnl.md b/docs/_importers/jrnl.md index b19328d7..a1b4b4a8 100644 --- a/docs/_importers/jrnl.md +++ b/docs/_importers/jrnl.md @@ -1,23 +1,5 @@ --- -layout: docs -title: Jrnl prev_section: joomla3 link_source: jrnl next_section: marley -permalink: /docs/jrnl/ --- - -To import your posts from [Jrnl](http://maebert.github.io/jrnl/), run: - -{% highlight bash %} -$ ruby -r rubygems -e 'require "jekyll-import"; - JekyllImport::Importers::Jrnl.run({ - "file" => "~/journal.txt", - "time_format" => "%Y-%m-%d %H:%M", - "extension" => "md", - "layout" => "post" - })' -{% endhighlight %} - -None of the fields are mandatory. The default to the values in the example -block above. diff --git a/docs/_importers/marley.md b/docs/_importers/marley.md index f0962f50..42d29dc4 100644 --- a/docs/_importers/marley.md +++ b/docs/_importers/marley.md @@ -1,20 +1,5 @@ --- -layout: docs -title: Marley prev_section: jrnl link_source: marley next_section: mephisto -permalink: /docs/marley/ --- - -To import your posts from [Marley](https://github.com/karmi/marley), run: - -{% highlight bash %} -$ ruby -r rubygems -e 'require "jekyll-import"; - JekyllImport::Importers::Marley.run({ - "marley_data_dir" => "my_marley_data_dir" - })' -{% endhighlight %} - -The `marley_data_dir` field is required and points to the directory in which -your Marley data resides. diff --git a/docs/_importers/medium.md b/docs/_importers/medium.md index 67101e4d..83063775 100644 --- a/docs/_importers/medium.md +++ b/docs/_importers/medium.md @@ -1,27 +1,8 @@ --- -layout: docs -title: Medium prev_section: marley link_source: medium next_section: mephisto -permalink: /docs/medium/ --- -To import your posts from [Medium](https://medium.com/), run: - -{% highlight bash %} -$ ruby -r rubygems -e 'require "jekyll-import"; - JekyllImport::Importers::Medium.run({ - "username" => "name", - "render_audio" => false, - "canonical_link" => false, - })' -{% endhighlight %} - -The `username` refers to the medium username, and it's a mandatory field. - -Other optional fields are as follows: -* `canonical_link` – copy original link as `canonical_url` to post. (default: `false`) -* `render_audio` – render `