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.
- checksums.yaml +4 -4
- data/lib/jekyll-rpg.rb +1 -1
- data/lib/references.rb +1 -17
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1683b40039a1a2bf8df03320da5e0a029c09dc3788fac0352ca84d9835e8b418
|
4
|
+
data.tar.gz: 0f775d00db33397e481c7ba0188629bc6b41284f044c4056633b1e696fbd730b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b3d036cfbc7b228dd6ceebff00d3b2e58da286208a2b79a08f7868f84d68b63258e8dc242a5023415f1cbed4f8c6ab35277f0fb9a13b59f7e442714db04b62c5
|
7
|
+
data.tar.gz: 87d5348c1d576dbdf8458db8c1d91b602f078620d88824cb7a826ec6f1b763b992ffe04dfb1a2852219bbbe51182926cd01023867744071aabdd812b140f6775
|
data/lib/jekyll-rpg.rb
CHANGED
data/lib/references.rb
CHANGED
@@ -4,11 +4,10 @@ require 'collection_page'
|
|
4
4
|
|
5
5
|
module JekyllRPG
|
6
6
|
class References
|
7
|
-
attr_accessor :collection_keys, :
|
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.
|
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-
|
11
|
+
date: 2019-09-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|