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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1c9ffcfc1c79c1f5305e307ee22c7526dd96cc72
4
- data.tar.gz: ce3d2d0fc18031279ed416887ba92c83c37462e5
3
+ metadata.gz: d51b5b2574013ab06ead15b3278b58460b128525
4
+ data.tar.gz: 916863cf4c2cc7cbce83ca1be4bd5420cfd9a97e
5
5
  SHA512:
6
- metadata.gz: d4ccae79b21f13d71b2acb65add678d8ad55ff8feec2671ab57c86b8c31f4fb8fd857b0e93122e9c6650094a16001fc2d3adc4d305263acf44aaf70ee21bf379
7
- data.tar.gz: 4fd7f92e0731abab9ade39884096e9bf6932bc6be49e0f3d4f0cbdf4f15a65f88d5de5df6ab317d8924a67891faac11c5ff3ac8e45982f990ddfb0a90581aa3f
6
+ metadata.gz: 81b596e0733cd36c12613a4fdbd16db990e05bbefc7c7fa020f572d40999835e39600691886337d95a39e8e9a06e89136e4151049b391a69090ddf01ea54a6c9
7
+ data.tar.gz: b69077701c01a4c6b616f07a2eb839289fdbc1454b6252606a8c95a64c821f2bfb4895f8d8f91be10a6d7c0a401b07bbf90345f36dbb5916d49db2d535d60f2f
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Mediumize
2
- VERSION = "0.4.2"
2
+ VERSION = "0.4.3"
3
3
  end
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.2
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: 2015-12-31 00:00:00.000000000 Z
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.4.5.1
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