Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Docs #503

Draft
wants to merge 15 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,8 @@ namespace :site do
if File.exist?("History.markdown")
history_file = File.read("History.markdown")
front_matter = {
"layout" => "docs",
"title" => "History",
"permalink" => "/docs/history/",
"prev_section" => "contributing",
"title" => "Project History",
"doc_order" => 6,
}
Dir.chdir("docs/_docs/") do
File.open("history.md", "w") do |file|
Expand Down
31 changes: 31 additions & 0 deletions docs/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
layout: base
permalink: /404.html
---

<style media="screen">
.flex-container {
display: flex;
justify-content: center;
align-items: center;
height: 50vh;
}
.http-error {
max-width: 600px;
text-align: center;
}
h1 {
margin: 30px 0;
font-size: 4em;
line-height: 1;
letter-spacing: -1px;
}
</style>

<div class="flex-container">
<div class="http-error">
<h1>404</h1>
<h2>Page not found :(</h2>
<p>The requested page could not be found.</p>
</div>
</div>
1 change: 0 additions & 1 deletion docs/README

This file was deleted.

12 changes: 3 additions & 9 deletions docs/_config.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
title: "jekyll-import • Import your old &amp; busted site to Jekyll"
url: https://import.jekyllrb.com
highlighter: rouge
relative_permalinks: false
permalink: /news/:year/:month/:day/:title/
excerpt_separator: ""
repository: https://github.com/jekyll/jekyll-import
latest_release: 0.14.0
permalink: pretty

collections:
docs:
output: true
sort_by: doc_order
importers:
output: true
permalink: /docs/:path/

defaults:
- scope:
Expand All @@ -23,6 +19,4 @@ defaults:
type: importers
values:
layout: importer

sass:
style: compressed
title_suffix: " Importer"
15 changes: 6 additions & 9 deletions docs/_docs/contributing.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
---
layout: docs
title: Contributing
prev_section: third-party
next_section: history
permalink: /docs/contributing/
doc_order: 4
---

jekyll-import is entirely open-source, which means we need your help to make it better!
Expand All @@ -28,7 +24,7 @@ So you have a new system you want to be able to import from? Great! It's pretty
First thing's first: create the file where the importer will go. In this case, that will be `lib/jekyll-import/importers/columbus.rb`.
Inside this file, we'll add this template:

{% highlight ruby %}
```ruby
module JekyllImport
module Importers
class Columbus < Importer
Expand Down Expand Up @@ -59,7 +55,7 @@ module JekyllImport
end
end
end
{% endhighlight %}
```

Let's go through this quickly.

Expand All @@ -79,16 +75,17 @@ Where the magic happens! This method should read from your *Columbus* source, th

This function is entirely optional, but allows for some validation of the options. This method allows you to validate the options in any way you wish. For example:

{% highlight ruby %}
```ruby
def self.validate(opts)
abort "Specify a username!" if opts["username"].nil?
abort "Your username must be a number." unless opts["username"].match(%r!\A\d+\z!)
end
{% endhighlight %}
```

Once you have your importer working (test with `script/console`), then you're ready to add **documentation**. Add your new file:
`./docs/_importers/columbus.md`. Take a look at one of the other importers as an example. You just add basic usage and you're golden.

All set? Add everything to a branch on your fork of `jekyll-import` and
[submit a pull request](https://github.com/jekyll/jekyll-import/compare/).

Thank you!
6 changes: 2 additions & 4 deletions docs/_docs/history.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
layout: docs
title: History
permalink: "/docs/history/"
prev_section: contributing
title: Project History
doc_order: 6
---

## 0.21.0 / 2021-10-31
Expand Down
23 changes: 12 additions & 11 deletions docs/_docs/index.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
---
layout: docs
title: Getting started
next_section: installation
permalink: /docs/home/
title: Getting Started
permalink: /docs/
doc_order: 1
---

If youre switching to Jekyll from another blogging system, Jekylls importers
can help you with the move. Most methods listed on this page require read access
to the database from your old system to generate posts for Jekyll. Each method
generates `.markdown` posts in the `_posts` directory based on the entries in
the foreign system.
If you're switching to Jekyll from another blogging system, Jekyll's importers
can help you with the move. Most importers listed on this site require read-access
to the database from your old system to generate posts for Jekyll. Importers
typically generates Markdown posts in the `_posts` directory based on the entries
in the foreign system.

## Other Systems

If you have a system for which there is currently no migrator, consider writing
one and sending us [a pull request](https://github.com/jekyll/jekyll-import).
If you are from a system for which there is currently no builtin importer,
[consider writing one][creating_importer] and sending us a pull request.

[creating_importer]: {{ '/docs/contributing#creating-a-new-importer' | relative_url }}
30 changes: 12 additions & 18 deletions docs/_docs/installation.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,21 @@
---
layout: docs
title: Installation
prev_section: home
next_section: usage
permalink: /docs/installation/
doc_order: 2
---

Because the importers have many of their own dependencies, they are made
available via a separate gem called
[`jekyll-import`](https://github.com/jekyll/jekyll-import). To use them, all
available to Jekyll via a separate gem named `jekyll-import`. To use them, all
you need to do is install the gem, and they will become available as part of
Jekyll's standard command line interface.

{% highlight bash %}
$ gem install jekyll-import
{% endhighlight %}
```bash
gem install jekyll-import
```
<div class="note warning" markdown="1">
Jekyll Import requires you to manually install some dependencies.

<div class="note warning">
<h5>Jekyll-import requires you to manually install some dependencies.</h5>
<p>Most importers require one or more dependencies. In order to keep
<code>jekyll-import</code>'s footprint small, we don't bundle the gem
with every plausible dependency. Instead, you will see a nice error
message describing any missing dependency and how to install it. If
you're especially savvy, take a look at the <code>require_deps</code>
method in your chosen importer to install all of the deps in one go.</p>
Most importers require one or more dependencies. In order to keep the plugin's
footprint small, we don't bundle the gem with every plausible dependency.
Instead, you will see a nice error message describing any missing dependency
and how to install it. We also document such dependencies in the dedicated
page for a given importer.
</div>
7 changes: 2 additions & 5 deletions docs/_importers/third-party.md → docs/_docs/third-party.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
---
layout: docs
title: Third-party
prev_section: wordpressdotcom
next_section: contributing
permalink: /docs/third-party/
title: Third-party Importers
doc_order: 5
---

Various third-party importers for Jekyll have been created separate from this
Expand Down
6 changes: 1 addition & 5 deletions docs/_docs/usage.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
---
layout: docs
title: Usage
prev_section: installation
next_section: behance
permalink: /docs/usage/
doc_order: 3
---

You should now be all set to run the importers with the following incantation:
Expand Down
6 changes: 1 addition & 5 deletions docs/_importers/behance.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
---
title: Behance
importer: true
prev_section: usage
link_source: behance
next_section: blogger
prereq_info: To import your posts from Behance, generate an API token for your user account.
---
4 changes: 0 additions & 4 deletions docs/_importers/blogger.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
---
importer: true
prev_section: behance
link_source: blogger
next_section: csv
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`).
Expand Down
5 changes: 1 addition & 4 deletions docs/_importers/csv.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
---
title: CSV
prev_section: blogger
link_source: csv
next_section: drupal6
---

Your CSV file will be read in with the following columns:
Expand All @@ -15,4 +12,4 @@ Your CSV file will be read in with the following columns:

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.
imparted to the imported files.
5 changes: 1 addition & 4 deletions docs/_importers/dotclear.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
---
title: Dotclear
prev_section: csv
link_source: dotclear
next_section: drupal6
title: DotClear
---
11 changes: 5 additions & 6 deletions docs/_importers/drupal6.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
title: Drupal 6
prev_section: csv
link_source: drupal6
next_section: drupal7
---

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 to select node types.
By default, the importer will pull in nodes of type `blog`, `story`, and `article`.
To specify custom types, you may use the `types` option while invoking the importer.

The default Drupal 6 expects database to be MySQL. If you want to import posts from
Drupal 6 installation with PostgreSQL define, pass `postgresql` to the `--engine` option.
11 changes: 5 additions & 6 deletions docs/_importers/drupal7.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
title: Drupal 7
prev_section: drupal6
link_source: drupal7
next_section: drupal8
---

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 to select node types.
By default, the importer will pull in nodes of type `blog`, `story`, and `article`.
To specify custom types, you may use the `types` option while invoking the importer.

The default Drupal 7 expects database to be MySQL. If you want to import posts from
Drupal 7 installation with PostgreSQL define, pass `postgresql` to the `--engine` option.
11 changes: 5 additions & 6 deletions docs/_importers/drupal8.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
title: Drupal 8
prev_section: drupal7
link_source: drupal8
next_section: easyblog
---

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 to select node types.
By default, the importer will pull in nodes of type `blog`, `story`, and `article`.
To specify custom types, you may use the `types` option while invoking the importer.

The default Drupal 8 expects database to be MySQL. If you want to import posts from
Drupal 8 installation with PostgreSQL define, pass `postgresql` to the `--engine` option.
5 changes: 2 additions & 3 deletions docs/_importers/easyblog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: EasyBlog
prev_section: drupal8
link_source: easyblog
next_section: enki
---

This importer will export all articles (in any state). Category and tags will also be included in export.
3 changes: 0 additions & 3 deletions docs/_importers/enki.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
---
prev_section: easyblog
link_source: enki
next_section: ghost
---
6 changes: 3 additions & 3 deletions docs/_importers/ghost.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
prev_section: enki
link_source: ghost
next_section: google_reader
prereq_info: >-
To import your posts from your self-hosted Ghost instance, you first have to download
your `ghost.db` from your server.
---

If you have a Ghost backup file, consider using another tool called
Expand Down
4 changes: 0 additions & 4 deletions docs/_importers/googlereader.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
---
title: Google Reader
prev_section: enki
link_source: google_reader
next_section: joomla
permalink: /docs/google_reader/
---
3 changes: 0 additions & 3 deletions docs/_importers/joomla.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
---
prev_section: google_reader
link_source: joomla
next_section: joomla3
---
7 changes: 2 additions & 5 deletions docs/_importers/joomla3.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
---
title: Joomla 3
prev_section: joomla
link_source: joomla3
next_section: jrnl
---

If the `category` numerical field is not filled, all articles will be imported, except the ones that are
uncategorized.
If the `category` numerical field is not filled, all articles will be imported, except the ones that are
uncategorized.
3 changes: 0 additions & 3 deletions docs/_importers/jrnl.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
---
prev_section: joomla3
link_source: jrnl
next_section: marley
---
3 changes: 0 additions & 3 deletions docs/_importers/marley.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
---
prev_section: jrnl
link_source: marley
next_section: mephisto
---
9 changes: 4 additions & 5 deletions docs/_importers/medium.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---
prev_section: marley
link_source: medium
next_section: mephisto
---

This importer will also import the existing tags/labels from Medium post and
include the tags to [Front Matter](https://jekyllrb.com/docs/front-matter/).
This importer will also import existing tags / labels from Medium post and
include those tags to the generated post's [front matter][front_matter_docs].

[front_matter_docs]: https://jekyllrb.com/docs/front-matter/
Loading