jekyll-linked-posts 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jekyll/linked_posts.rb +6 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7f93e87d40ed284d13bb31784c5b2d11684cca725444dd94d3cb9e264ce3b394
|
4
|
+
data.tar.gz: a2fbc7b95e5746b654ec59a32d73a30e693eb787955f3e9938b7a753c6c7661f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d955d83efd3a820eabb360c0c2472d77ec30fd143dafb982db43c479ecb2df7aed7e9d17edf1df43155dac6fe3f0951f2b25050458902c53b986d44655dac4a9
|
7
|
+
data.tar.gz: 5aedb476f2dc7e2c8d66a519279ec6c9904c9273b7c196d8cfb16b1b665c1794bcc61e74d7c560b62ba72e2bfaf85a5ccd4d6d4cbb0026c922ce8d1bb0245c52
|
data/lib/jekyll/linked_posts.rb
CHANGED
@@ -20,11 +20,7 @@ module Jekyll
|
|
20
20
|
# If it doesn't find anything it'll show a warning and replace the
|
21
21
|
# value for nil.
|
22
22
|
def read
|
23
|
-
|
24
|
-
process doc
|
25
|
-
end
|
26
|
-
|
27
|
-
site.pages.each do |doc|
|
23
|
+
indexable_documents.each do |doc|
|
28
24
|
process doc
|
29
25
|
end
|
30
26
|
end
|
@@ -60,6 +56,10 @@ module Jekyll
|
|
60
56
|
nil
|
61
57
|
end
|
62
58
|
|
59
|
+
def indexable_documents
|
60
|
+
@indexable_documents ||= site.documents + site.pages
|
61
|
+
end
|
62
|
+
|
63
63
|
# The field to index posts by
|
64
64
|
#
|
65
65
|
# @return [String] by default uuid
|
@@ -73,7 +73,7 @@ module Jekyll
|
|
73
73
|
#
|
74
74
|
# @return [Hash]
|
75
75
|
def indexed_documents
|
76
|
-
@indexed_documents ||=
|
76
|
+
@indexed_documents ||= indexable_documents.reduce({}) do |docs, doc|
|
77
77
|
index_value = doc.data[indexed_field]
|
78
78
|
|
79
79
|
unless index_value
|