jekyll-external-links 0.1 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 874a5043ed58555922815f10b706a43d31602b33
4
- data.tar.gz: 692246a4713c26ceed5ae997d1648a44f2bfe7a9
3
+ metadata.gz: 9fad789b161df6777b4c192d31fe97f3af1001f6
4
+ data.tar.gz: d50cab726cd2615cd84abcb44d9942c9c1eaf623
5
5
  SHA512:
6
- metadata.gz: 4346f5087be47d6982afb5052eb8db9f38121dc80b9702bae39d8389c388e53d62495d61354c66a2225c37325df91747889baa0dce49732bf155326a48157f86
7
- data.tar.gz: 345cde83fa3d65b18772acf03d5fc27b38dd46a1f6b4007295c7ec21f38fb191a99c5ed91c653729e14946678b71776b2bf8410bbc7503c78520ea5b8bdf5028
6
+ metadata.gz: dfb711521096e7586b5c5dcf47c83c129e0b333b6befeecf7f7c04458b572e0ff0d2d837d4bbb5d5de4f80f73a26971c7c333dc3f0da68cae4e2448f18151330
7
+ data.tar.gz: eddf6326c88ce67e6f9e0bcbcefd87c2b31ca0c6f3e385b4176a48afbada5220e35646f8aec37fd024092ebd3ed4a41113698523699baae75bf74f7ab7b5e53a
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'jekyll-external-links'
5
- s.version = '0.1'
5
+ s.version = '0.1.1'
6
6
  s.authors = ['Ribose Inc.']
7
7
  s.email = ['open.source@ribose.com']
8
8
 
@@ -21,10 +21,10 @@ def process_content(site_hostname, content, marker_html, link_selector, exclude_
21
21
  return content.to_s
22
22
  end
23
23
 
24
- def process_page_or_document(page_or_document)
25
- site_hostname = URI(doc.site.config['url']).host
24
+ def mark_links_in_page_or_document(page_or_document)
25
+ site_hostname = URI(page_or_document.site.config['url']).host
26
26
 
27
- ext_link_config = doc.site.config['external_links'] || {}
27
+ ext_link_config = page_or_document.site.config['external_links'] || {}
28
28
 
29
29
  # The link is marked as external by:
30
30
  # (1) setting the rel attribute to external and
@@ -46,7 +46,7 @@ def process_page_or_document(page_or_document)
46
46
  unless page_or_document.asset_file?
47
47
  page_or_document.output = process_content(
48
48
  site_hostname,
49
- doc.output,
49
+ page_or_document.output,
50
50
  marker_html,
51
51
  link_selector,
52
52
  unmarked_link_selectors)
@@ -69,5 +69,5 @@ Jekyll::Hooks.register :documents, :post_render do |doc|
69
69
  end
70
70
 
71
71
  Jekyll::Hooks.register :pages, :post_render do |page|
72
- mark_links_in_page_or_document(doc)
72
+ mark_links_in_page_or_document(page)
73
73
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-external-links
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.1'
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.