Skip to content

Commit 89715e6

Browse files
committed
Adjust new Medium importer and documentation
1 parent 5873878 commit 89715e6

File tree

2 files changed

+5
-27
lines changed

2 files changed

+5
-27
lines changed

docs/_importers/medium.md

+2-24
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,5 @@
11
---
2-
layout: docs
3-
title: Medium
4-
prev_section: marley
5-
link_source: medium
6-
next_section: mephisto
7-
permalink: /docs/medium/
82
---
93

10-
To import your posts from [Medium](https://medium.com/), run:
11-
12-
{% highlight bash %}
13-
$ ruby -r rubygems -e 'require "jekyll-import";
14-
JekyllImport::Importers::Medium.run({
15-
"username" => "name",
16-
"render_audio" => false,
17-
"canonical_link" => false,
18-
})'
19-
{% endhighlight %}
20-
21-
The `username` refers to the medium username, and it's a mandatory field.
22-
23-
Other optional fields are as follows:
24-
* `canonical_link` – copy original link as `canonical_url` to post. (default: `false`)
25-
* `render_audio` – render `<audio>` element in posts for the enclosure URLs. (default: `false`)
26-
27-
_Note:_ 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/).
4+
This importer will also import existing tags / labels from Medium post and include those tags to the generated post's
5+
[front matter](https://jekyllrb.com/docs/front-matter/).

lib/jekyll-import/importers/medium.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ module JekyllImport
44
module Importers
55
class Medium < Importer
66
def self.specify_options(c)
7-
c.option "username", "--username NAME", "Medium username"
8-
c.option "canonical_link", "--canonical_link", "Copy original link as canonical_url to post (default: false)"
9-
c.option "render_audio", "--render_audio", "Render <audio> element in posts for the enclosure URLs (default: false)"
7+
c.option "username", "--username NAME", "Medium username."
8+
c.option "canonical_link", "--canonical_link", "Add original link as `canonical_url` to post front matter. (default: false)"
9+
c.option "render_audio", "--render_audio", "Render `<audio>` element in posts for the enclosure URLs. (default: false)"
1010
end
1111

1212
def self.validate(options)

0 commit comments

Comments
 (0)