jekyll-hyperlinkify-glossary 0.1.3 → 0.1.4
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 +4 -4
- data/lib/hooks/enrich_documents_with_glossary.rb +6 -2
- 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: 559374e4ba315cc06e5dbfb43f6de5c37c2b6f411972febea30cfb8951ca2ac9
|
|
4
|
+
data.tar.gz: 2d316c25608bec367fd8cf0c7f0dcc7cd615bb805db9dce9387d55e5bdb9322f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 41542305ea5a467d697a56646398fd933524b5ab7efa6673e5fee86b44b1a693d6b49c4fd97b7861c4bf0b69524d9428b93953f67191e4ef07b4decb24de5747
|
|
7
|
+
data.tar.gz: 18708e7fdb6ea730ae2bc75ef24b00ce5990126877fa24cb4e6cc32589a38a7c8d3da2d56279a6d8caea5a5a3b9cc28bc83ff6304c3897850ce345fb11a19131
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
# Enrich all documents and pages with an array of all glossary entries and their synonyms
|
|
2
2
|
Jekyll::Hooks.register :site, :post_read do |site|
|
|
3
3
|
puts 'Enriching documents with glossary collection'
|
|
4
|
+
base_url = ""
|
|
5
|
+
if site.config['hyperlinkify_glossary_base_url']
|
|
6
|
+
base_url = site.config['hyperlinkify_glossary_base_url']
|
|
7
|
+
end
|
|
4
8
|
glossary_entries = []
|
|
5
9
|
site.collections["glossary"].docs.each do |item|
|
|
6
|
-
next_glossary_entry = [[item.url, item.data['title']],item.data['synonyms']].compact.reduce([], :|)
|
|
10
|
+
next_glossary_entry = [[base_url + item.url, item.data['title']],item.data['synonyms']].compact.reduce([], :|)
|
|
7
11
|
glossary_entries.push next_glossary_entry.map(&:downcase )
|
|
8
12
|
end
|
|
9
13
|
site.documents.each{ |document|
|
|
@@ -12,4 +16,4 @@ Jekyll::Hooks.register :site, :post_read do |site|
|
|
|
12
16
|
site.pages.each{ |document|
|
|
13
17
|
document.data['glossary_entries'] = glossary_entries
|
|
14
18
|
}
|
|
15
|
-
end
|
|
19
|
+
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: jekyll-hyperlinkify-glossary
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Marc Schmidt
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2022-07-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: jekyll
|