jekyll-geolexica 1.5.4 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_pages/concepts-index.json +6 -5
- data/assets/js/concept-search-worker.js +20 -3
- data/gemfiles/Jekyll-4.0.gemfile +3 -0
- data/gemfiles/Jekyll-4.1.gemfile +3 -0
- data/gemfiles/Jekyll-4.2.gemfile +3 -0
- data/jekyll-geolexica.gemspec +1 -1
- data/lib/jekyll/geolexica/version.rb +1 -1
- metadata +12 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fa082f698405c5747b8479196495e0f13c46d8abab8e805225436f51a4583bf7
|
4
|
+
data.tar.gz: c2281b410069a7eacb57eee814b0f2ba02a0f523ab6ae27ccc76216265a81d41
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 82b6e04b1eaf33573a03878d63743581c57a274ae64ec49434395b4b0cbb39de3112d97e4bd54f48bb2dc4f137ca3f0d50bed277e91a13727e998c83c71a7cd9
|
7
|
+
data.tar.gz: 13bfc507093d9beef13813c160c4d3974f5533813bf7306688606fa16d8289eb575e978f5cb9adae1daae0170605678092e747fdaa82860be0e1e8c26303b444
|
data/_pages/concepts-index.json
CHANGED
@@ -4,11 +4,12 @@ permalink: "/api/concepts.json"
|
|
4
4
|
{
|
5
5
|
{% for concept in site.concepts %}
|
6
6
|
{% assign json_concept = concept.representations.json %}
|
7
|
-
|
8
|
-
|
9
|
-
"
|
10
|
-
"
|
11
|
-
"uri-
|
7
|
+
{% comment %}"append" below ensures conversion to string{% endcomment -%}
|
8
|
+
{{ concept.termid | append: '' | jsonify }}: {
|
9
|
+
"term": {{ concept.term | jsonify }},
|
10
|
+
"termid": {{ concept.termid | jsonify }},
|
11
|
+
"uri-html": {{ concept.url | jsonify }},
|
12
|
+
"uri-json": {{ json_concept.url | jsonify }}
|
12
13
|
}{% unless forloop.last %},{% endunless %}
|
13
14
|
{% endfor %}
|
14
15
|
}
|
@@ -15,6 +15,22 @@ const LANGUAGES = (function() {
|
|
15
15
|
var concepts = null;
|
16
16
|
var latestQuery = null;
|
17
17
|
|
18
|
+
// TODO Support filters here maybe.
|
19
|
+
class SearchQuery {
|
20
|
+
constructor(queryString) {
|
21
|
+
this.searchWords = queryString.toLowerCase().match(/\p{Letter}+/ug) || [];
|
22
|
+
}
|
23
|
+
|
24
|
+
isEmpty() {
|
25
|
+
return this.searchWords.length == 0;
|
26
|
+
}
|
27
|
+
|
28
|
+
match(string) {
|
29
|
+
const stringLC = string.toLowerCase();
|
30
|
+
return this.searchWords.every((word) => stringLC.includes(word));
|
31
|
+
}
|
32
|
+
}
|
33
|
+
|
18
34
|
function fetchConcepts() {
|
19
35
|
if (concepts === null) {
|
20
36
|
concepts = fetch(CONCEPTS_URL).then((resp) => resp.json());
|
@@ -25,16 +41,17 @@ function fetchConcepts() {
|
|
25
41
|
async function filterAndSort(params) {
|
26
42
|
var concepts = await fetchConcepts();
|
27
43
|
|
28
|
-
|
44
|
+
const query = new SearchQuery(params.string);
|
45
|
+
|
46
|
+
if (!query.isEmpty()) {
|
29
47
|
concepts = concepts.map((_item) => {
|
30
48
|
// Search all localized term names for the presence of given search string
|
31
49
|
|
32
50
|
const item = Object.assign({}, _item);
|
33
|
-
const queryString = params.string.toLowerCase();
|
34
51
|
const matchingLanguages = LANGUAGES.
|
35
52
|
filter((lang) => {
|
36
53
|
const term = (item[lang] || {}).term;
|
37
|
-
return term &&
|
54
|
+
return term && query.match(term);
|
38
55
|
});
|
39
56
|
|
40
57
|
if (matchingLanguages.length > 0) {
|
data/jekyll-geolexica.gemspec
CHANGED
@@ -39,7 +39,7 @@ Gem::Specification.new do |spec|
|
|
39
39
|
# I doubt we should be worried, but there is no good reason to allow them
|
40
40
|
# either.
|
41
41
|
# See: https://jekyllrb.com/news/2020/06/24/jekyll-4-1-1-released/
|
42
|
-
spec.add_runtime_dependency "jekyll", ">= 3.8.5", "< 4.
|
42
|
+
spec.add_runtime_dependency "jekyll", ">= 3.8.5", "< 4.3", "!= 4.1.0"
|
43
43
|
|
44
44
|
spec.add_runtime_dependency "jekyll-asciidoc"
|
45
45
|
|
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.
|
4
|
+
version: 1.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: 3.8.5
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '4.
|
22
|
+
version: '4.3'
|
23
23
|
- - "!="
|
24
24
|
- !ruby/object:Gem::Version
|
25
25
|
version: 4.1.0
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: 3.8.5
|
33
33
|
- - "<"
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version: '4.
|
35
|
+
version: '4.3'
|
36
36
|
- - "!="
|
37
37
|
- !ruby/object:Gem::Version
|
38
38
|
version: 4.1.0
|
@@ -120,7 +120,7 @@ dependencies:
|
|
120
120
|
- - "~>"
|
121
121
|
- !ruby/object:Gem::Version
|
122
122
|
version: '3.9'
|
123
|
-
description:
|
123
|
+
description:
|
124
124
|
email:
|
125
125
|
- open.source@ribose.com
|
126
126
|
executables: []
|
@@ -194,6 +194,9 @@ files:
|
|
194
194
|
- assets/resource-viewer-placeholder.html
|
195
195
|
- assets/style.scss
|
196
196
|
- babel.config.js
|
197
|
+
- gemfiles/Jekyll-4.0.gemfile
|
198
|
+
- gemfiles/Jekyll-4.1.gemfile
|
199
|
+
- gemfiles/Jekyll-4.2.gemfile
|
197
200
|
- jekyll-geolexica.gemspec
|
198
201
|
- lib/jekyll-geolexica.rb
|
199
202
|
- lib/jekyll/geolexica.rb
|
@@ -216,7 +219,7 @@ metadata:
|
|
216
219
|
bug_tracker_uri: https://github.com/geolexica/geolexica-server/issues
|
217
220
|
homepage_uri: https://open.ribose.com/
|
218
221
|
source_code_uri: https://github.com/geolexica/geolexica-server
|
219
|
-
post_install_message:
|
222
|
+
post_install_message:
|
220
223
|
rdoc_options: []
|
221
224
|
require_paths:
|
222
225
|
- lib
|
@@ -231,8 +234,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
231
234
|
- !ruby/object:Gem::Version
|
232
235
|
version: '0'
|
233
236
|
requirements: []
|
234
|
-
rubygems_version: 3.
|
235
|
-
signing_key:
|
237
|
+
rubygems_version: 3.2.3
|
238
|
+
signing_key:
|
236
239
|
specification_version: 4
|
237
240
|
summary: Geolexica plugin for Jekyll
|
238
241
|
test_files: []
|