jekyll-geolexica 1.8.10 → 1.8.12

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 323766073e831a5ab9f954b741b40908c4450927624cc77cb79fdd29a300ba9c
4
- data.tar.gz: 5e62242e26b9e87971fa73f365302bed470472c3e7c75f3f45f2684dbe5a2bb9
3
+ metadata.gz: 339e543a0ab788e7bcfa8adf5b7aead6cf53ad0580e765f024e72381bc5cda24
4
+ data.tar.gz: b47938698f4166e4d1f990683c1f7df3448d14d35de59030bf4bd95b43ed30fc
5
5
  SHA512:
6
- metadata.gz: 8c9aae349fcd35b6b0b4de0ef2cb6356d0fcadc5d855c3aa50bdf6019d786774ed888fe3cb3fca0272d650d2cef077dd8e94800459ff923fe25b3bfff9072a6e
7
- data.tar.gz: 9185da4c90ce2fde1624163a82796c137fa88a820f489591de509b65c023f82776ec3399831681b9c3dee5493b68105c2eb8f49ea207ab4a92966a65436db8cc
6
+ metadata.gz: 3b72c81b7d64d2808fcb5c6e4e1ec0acdaf9157cb15c7a1299d9cbc9d6d40445fc2b72b2b34d3f8c5c5772771d1cb6a4f121bb459fdbab5cf6a2aa9a80971303
7
+ data.tar.gz: 0a4d8f4ae92a8aa5ab2d6545487f495fc09335cdb68f2ee7d5bc7b6208c42b8b9a9d886216c5e6fc01fe21a80a44c63e9f8c6f70f68f8321e35f003edae73d0a
@@ -71,12 +71,29 @@ module Jekyll
71
71
 
72
72
  next unless concept[lang]
73
73
 
74
+ normalize_sources(concept[lang])
74
75
  concept['term'] = concept[lang]['terms'].first['designation'] if lang == 'eng'
75
76
  end
76
77
 
77
78
  concept
78
79
  end
79
80
 
81
+ def normalize_sources(concept)
82
+ authoritative_sources = concept.delete('authoritativeSource') || []
83
+ concept['sources'] ||= []
84
+
85
+ authoritative_sources.each do |authoritative_source|
86
+ concept['sources'] << {
87
+ "origin" => {
88
+ 'ref' => authoritative_source['ref'],
89
+ 'clause' => authoritative_source['clause'],
90
+ 'link' => authoritative_source['link'],
91
+ }.compact,
92
+ 'type' => 'authoritative'
93
+ }
94
+ end
95
+ end
96
+
80
97
  # Does nothing, but some sites may replace this method.
81
98
  def preprocess_concept_hash(concept_hash); end
82
99
 
@@ -3,6 +3,6 @@
3
3
 
4
4
  module Jekyll
5
5
  module Geolexica
6
- VERSION = "1.8.10".freeze
6
+ VERSION = "1.8.12".freeze
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-geolexica
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.10
4
+ version: 1.8.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-04-24 00:00:00.000000000 Z
11
+ date: 2023-08-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll