mediumize 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mediumize/renderer.rb +6 -1
- data/lib/mediumize/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d51b5b2574013ab06ead15b3278b58460b128525
|
4
|
+
data.tar.gz: 916863cf4c2cc7cbce83ca1be4bd5420cfd9a97e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81b596e0733cd36c12613a4fdbd16db990e05bbefc7c7fa020f572d40999835e39600691886337d95a39e8e9a06e89136e4151049b391a69090ddf01ea54a6c9
|
7
|
+
data.tar.gz: b69077701c01a4c6b616f07a2eb839289fdbc1454b6252606a8c95a64c821f2bfb4895f8d8f91be10a6d7c0a401b07bbf90345f36dbb5916d49db2d535d60f2f
|
data/lib/mediumize/renderer.rb
CHANGED
@@ -22,6 +22,7 @@ module Mediumize
|
|
22
22
|
if(@opts[:frontmatter])
|
23
23
|
content, meta = Frontmatter.parse(content)
|
24
24
|
opts[:title] ||= meta["title"]
|
25
|
+
opts[:canonical_url] ||= meta["canonical_url"]
|
25
26
|
end
|
26
27
|
|
27
28
|
markup = @markdown.render(content)
|
@@ -34,11 +35,15 @@ module Mediumize
|
|
34
35
|
doc.at('body').children.first.add_previous_sibling("<h1>#{doc.title}</h1")
|
35
36
|
end
|
36
37
|
|
37
|
-
{
|
38
|
+
doc = {
|
38
39
|
:title => doc.title,
|
39
40
|
:content => doc.at('body').children.to_html,
|
40
41
|
:content_format => "html"
|
41
42
|
}
|
43
|
+
|
44
|
+
doc.merge!({:canonical_url => opts[:canonical_url]}) if opts[:canonical_url]
|
45
|
+
|
46
|
+
doc
|
42
47
|
end
|
43
48
|
|
44
49
|
end
|
data/lib/mediumize/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mediumize
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dotan Nahum
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-04-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -209,7 +209,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
209
209
|
version: '0'
|
210
210
|
requirements: []
|
211
211
|
rubyforge_project:
|
212
|
-
rubygems_version: 2.
|
212
|
+
rubygems_version: 2.5.1
|
213
213
|
signing_key:
|
214
214
|
specification_version: 4
|
215
215
|
summary: Turn your markdown style blog posts from Jekyll, middleman and others to
|