jekyll-rpg 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/jekyll-rpg.rb +1 -1
  3. data/lib/references.rb +1 -17
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ca2f5fd2ef2b7076cd7b216e32afddfbd82f42f6623d210e18261fa8bd63d6b2
4
- data.tar.gz: af02fd64b839d1f2f195e89b6e5e643ddccc6b80ba104a0e96fee9f30759f18a
3
+ metadata.gz: 1683b40039a1a2bf8df03320da5e0a029c09dc3788fac0352ca84d9835e8b418
4
+ data.tar.gz: 0f775d00db33397e481c7ba0188629bc6b41284f044c4056633b1e696fbd730b
5
5
  SHA512:
6
- metadata.gz: f33eb4bb05143ae686511f768675f34264039750315e727b5783c03cc227c8f03c82074eba0bdbe28427d2cf74309c2240ca6fe716d180c4c8fcdeea8030de06
7
- data.tar.gz: 27ea0217d2a7ed24c9cce3aa67bc2318801a6095e3e443e4dde033a73382b096f2b5363f48e46c336cf7fcf1a58531633a2c52678b87282f3df8fb237ae622a5
6
+ metadata.gz: b3d036cfbc7b228dd6ceebff00d3b2e58da286208a2b79a08f7868f84d68b63258e8dc242a5023415f1cbed4f8c6ab35277f0fb9a13b59f7e442714db04b62c5
7
+ data.tar.gz: 87d5348c1d576dbdf8458db8c1d91b602f078620d88824cb7a826ec6f1b763b992ffe04dfb1a2852219bbbe51182926cd01023867744071aabdd812b140f6775
@@ -8,7 +8,7 @@ module JekyllRPG
8
8
  Jekyll::Hooks.register :site, :post_read do |site|
9
9
  ref = References.new(site)
10
10
 
11
- site.data['graph'] = ref.references
11
+ site.data['graph'] = ref.graph
12
12
 
13
13
  site.data['broken_links'] = ref.broken_links
14
14
  end
@@ -4,11 +4,10 @@ require 'collection_page'
4
4
 
5
5
  module JekyllRPG
6
6
  class References
7
- attr_accessor :collection_keys, :references, :broken_links, :graph
7
+ attr_accessor :collection_keys, :broken_links, :graph
8
8
 
9
9
  def initialize(site)
10
10
  @site = site
11
- @references = {}
12
11
  @graph = []
13
12
  @broken_links = []
14
13
  @collection_keys = @site.collections.keys - ['posts']
@@ -27,7 +26,6 @@ module JekyllRPG
27
26
  )
28
27
  markdown_links(doc).each do |reference|
29
28
  @graph.push(edge(referent, reference))
30
- add_reference(doc, reference)
31
29
  end
32
30
  end
33
31
  end
@@ -137,20 +135,6 @@ module JekyllRPG
137
135
  end
138
136
  end
139
137
 
140
- def add_reference(doc, reference)
141
- referent_collection = doc.collection.label
142
- referent_page = doc.data['slug']
143
-
144
- # Find part of markdown link that represents the collection and item
145
- referenced_name, referenced_collection, referenced_page = link_components(reference)
146
-
147
- @references[referenced_collection] = {} unless @references.key?(referenced_collection)
148
- @references[referenced_collection][referenced_page] = {} unless @references[referenced_collection].key?(referenced_page)
149
- @references[referenced_collection][referenced_page][referent_collection] = {} unless @references[referenced_collection][referenced_page].key?(referent_collection)
150
-
151
- @references[referenced_collection][referenced_page][referent_collection][referent_page] = doc.data['name']
152
- end
153
-
154
138
  def refs_table(refs)
155
139
  table = <<~TABLE
156
140
  # Referenced By:
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-rpg
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Lockwood
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-05 00:00:00.000000000 Z
11
+ date: 2019-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll