jekyll-geolexica 1.2.2 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_config.yml +0 -25
- data/_includes/analytics.html +12 -0
- data/_includes/head.html +3 -5
- data/_includes/localized-concept.html +1 -1
- data/_includes/math-config.html +7 -0
- data/_includes/title.html +1 -1
- data/_layouts/concept.html +0 -2
- data/_layouts/default.html +4 -3
- data/_sass/concept.scss +1 -1
- data/_sass/main.scss +7 -3
- data/jekyll-geolexica.gemspec +6 -1
- data/lib/jekyll/geolexica/concept_page.rb +27 -19
- data/lib/jekyll/geolexica/concepts_generator.rb +12 -0
- data/lib/jekyll/geolexica/version.rb +1 -1
- metadata +12 -5
- data/assets/js/ga.js +0 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df419dc2ad54d36d0ab4de9d534550b154dcb2b2a9a40b660d357ff692c6ec55
|
4
|
+
data.tar.gz: 1a9de9ac8025af15d280176c45775ddb0aafdb3f1cc87d3007e424088eb66eae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df6a8124c544aafcd635e8725a5d3807294bae06a503988c48042294f2f685b4b9a6fa5f3d459088a9f4705ba4ac571032eee2e4b2d46bc130b4f280b6feba2e
|
7
|
+
data.tar.gz: d8c7ab3b25e6676741ccd06e7971bcc1075779de3ec5ceffffc8946fc7fb1d37608ec0415448ef7c1dc1d13371919239dcc93327bda8379597321f6a87d43fdc
|
data/_config.yml
CHANGED
@@ -29,31 +29,6 @@ powered_by:
|
|
29
29
|
title: Ribose
|
30
30
|
logo_path: /assets/logo-ribose.svg
|
31
31
|
|
32
|
-
sass:
|
33
|
-
style: compressed
|
34
|
-
|
35
|
-
collections:
|
36
|
-
pages:
|
37
|
-
output: true
|
38
|
-
permalink: /:path/
|
39
|
-
concepts:
|
40
|
-
output: true
|
41
|
-
concepts_json:
|
42
|
-
output: true
|
43
|
-
output_ext: .json
|
44
|
-
concepts_jsonld:
|
45
|
-
output: true
|
46
|
-
output_ext: .jsonld
|
47
|
-
concepts_ttl:
|
48
|
-
output: true
|
49
|
-
output_ext: .ttl
|
50
|
-
concepts_tbx:
|
51
|
-
output: true
|
52
|
-
output_ext: .tbx.xml
|
53
|
-
concepts_yaml:
|
54
|
-
output: true
|
55
|
-
output_ext: .yaml
|
56
|
-
|
57
32
|
geolexica:
|
58
33
|
concepts_glob: "./geolexica-database/concepts/*.yaml"
|
59
34
|
concept_date_format: "%F"
|
@@ -0,0 +1,12 @@
|
|
1
|
+
{%- assign gaid = site.google_analytics.id -%}
|
2
|
+
{%- if jekyll.environment == 'production' and gaid -%}
|
3
|
+
<!-- Global site tag (gtag.js) - Google Analytics -->
|
4
|
+
<script async src="https://www.googletagmanager.com/gtag/js?id={{ gaid }}"></script>
|
5
|
+
<script>
|
6
|
+
window.dataLayer = window.dataLayer || [];
|
7
|
+
function gtag(){dataLayer.push(arguments);}
|
8
|
+
gtag("js", new Date());
|
9
|
+
|
10
|
+
gtag("config", "{{ gaid }}");
|
11
|
+
</script>
|
12
|
+
{%- endif -%}
|
data/_includes/head.html
CHANGED
@@ -1,6 +1,9 @@
|
|
1
1
|
<head>
|
2
2
|
<meta charset="utf-8">
|
3
3
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
4
|
+
|
5
|
+
{% include analytics.html %}
|
6
|
+
|
4
7
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
5
8
|
<meta name="description" content="{{ site.description }}">
|
6
9
|
|
@@ -41,9 +44,4 @@
|
|
41
44
|
<![endif]-->
|
42
45
|
|
43
46
|
<link rel="stylesheet" type="text/css" href="{{ "/assets/style.css" | relative_url }}" />
|
44
|
-
|
45
|
-
{% if jekyll.environment == 'production' and site.google_analytics %}
|
46
|
-
<script src="{{ "/assets/js/ga.js" | relative_url }}"></script>
|
47
|
-
{% endif %}
|
48
|
-
|
49
47
|
</head>
|
data/_includes/title.html
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
{% assign title = page.term | default: page.title | default: site.title -%}
|
2
|
-
{{ title | escape }} — {{ site.tagline | escape }}
|
2
|
+
{{ title | escape }} — {{ site.tagline | escape -}}
|
data/_layouts/concept.html
CHANGED
data/_layouts/default.html
CHANGED
@@ -1,9 +1,6 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
2
|
|
3
3
|
<html
|
4
|
-
{% if site.google_analytics %}
|
5
|
-
data-gaid="{{ site.google_analytics.id }}"
|
6
|
-
{% endif %}
|
7
4
|
lang="{{ page.lang | default: site.lang | default: "en" }}">
|
8
5
|
|
9
6
|
{% include head.html %}
|
@@ -153,6 +150,10 @@
|
|
153
150
|
|
154
151
|
{% include script.html %}
|
155
152
|
|
153
|
+
{% if site.geolexica.math %}
|
154
|
+
{%- include math-config.html -%}
|
155
|
+
{% endif %}
|
156
|
+
|
156
157
|
<template id="expandableNavTrigger">
|
157
158
|
<button class="nav-expand-trigger">
|
158
159
|
<i class="fas fa-bars"></i>
|
data/_sass/concept.scss
CHANGED
data/_sass/main.scss
CHANGED
@@ -250,7 +250,7 @@ body {
|
|
250
250
|
|
251
251
|
box-sizing: border-box;
|
252
252
|
|
253
|
-
@media screen and (max-width: $bigscreenBreakpoint) {
|
253
|
+
@media screen and (max-width: $bigscreenBreakpoint - 1) {
|
254
254
|
margin-right: -1px;
|
255
255
|
margin-bottom: -1px;
|
256
256
|
flex: 1;
|
@@ -272,7 +272,7 @@ body {
|
|
272
272
|
flex-flow: row wrap;
|
273
273
|
|
274
274
|
.widget-item {
|
275
|
-
@media screen and (max-width: $bigscreenBreakpoint) {
|
275
|
+
@media screen and (max-width: $bigscreenBreakpoint - 1) {
|
276
276
|
flex-basis: 50%;
|
277
277
|
&.home {
|
278
278
|
flex: 0;
|
@@ -320,7 +320,7 @@ body {
|
|
320
320
|
}
|
321
321
|
}
|
322
322
|
|
323
|
-
@media screen and (max-width: $bigscreenBreakpoint) {
|
323
|
+
@media screen and (max-width: $bigscreenBreakpoint - 1) {
|
324
324
|
.parent-org-reference .logo-link img {
|
325
325
|
visibility: hidden;
|
326
326
|
}
|
@@ -354,6 +354,10 @@ body {
|
|
354
354
|
margin-right: 0;
|
355
355
|
}
|
356
356
|
|
357
|
+
@media screen and (max-width: $bigscreenBreakpoint - 1) {
|
358
|
+
display: none;
|
359
|
+
}
|
360
|
+
|
357
361
|
li {
|
358
362
|
display: inline;
|
359
363
|
margin-right: 1em;
|
data/jekyll-geolexica.gemspec
CHANGED
@@ -35,7 +35,12 @@ Gem::Specification.new do |spec|
|
|
35
35
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
36
36
|
spec.require_paths = ["lib"]
|
37
37
|
|
38
|
-
|
38
|
+
# Jekyll 4.1.0 adds some breaking changes which are reverted in 4.1.1.
|
39
|
+
# I doubt we should be worried, but there is no good reason to allow them
|
40
|
+
# either.
|
41
|
+
# See: https://jekyllrb.com/news/2020/06/24/jekyll-4-1-1-released/
|
42
|
+
spec.add_runtime_dependency "jekyll", ">= 3.8.5", "< 4.2", "!= 4.1.0"
|
43
|
+
|
39
44
|
spec.add_runtime_dependency "jekyll-asciidoc"
|
40
45
|
|
41
46
|
spec.add_development_dependency "bundler", "~> 2.1"
|
@@ -26,26 +26,12 @@ module Jekyll
|
|
26
26
|
def default_data
|
27
27
|
{
|
28
28
|
"layout" => layout,
|
29
|
+
"liquid" => uses_liquid,
|
29
30
|
"permalink" => permalink,
|
30
31
|
"representations" => concept.pages,
|
31
32
|
}
|
32
33
|
end
|
33
34
|
|
34
|
-
# Disables Liquid processing for given content.
|
35
|
-
#
|
36
|
-
# FIXME Still may break if +content+ contains the "{% endraw %}" sequence,
|
37
|
-
# which is very unlikely as we work with trusted input.
|
38
|
-
# Preferred solution is to make the whole page a non-Liquid file,
|
39
|
-
# or mark as already processed, or something, but it is unclear how
|
40
|
-
# to achieve that.
|
41
|
-
def escape_liquid(content)
|
42
|
-
[
|
43
|
-
"{\% raw \%}",
|
44
|
-
content,
|
45
|
-
"{\% endraw \%}",
|
46
|
-
].join("")
|
47
|
-
end
|
48
|
-
|
49
35
|
class HTML < ConceptPage
|
50
36
|
def page_name
|
51
37
|
"#{termid}.html"
|
@@ -59,6 +45,10 @@ module Jekyll
|
|
59
45
|
"concept"
|
60
46
|
end
|
61
47
|
|
48
|
+
def uses_liquid
|
49
|
+
true
|
50
|
+
end
|
51
|
+
|
62
52
|
def permalink
|
63
53
|
"/concepts/#{termid}/"
|
64
54
|
end
|
@@ -78,8 +68,11 @@ module Jekyll
|
|
78
68
|
end
|
79
69
|
|
80
70
|
def content
|
81
|
-
|
82
|
-
|
71
|
+
ConceptSerializer.new(concept, site).to_json
|
72
|
+
end
|
73
|
+
|
74
|
+
def uses_liquid
|
75
|
+
false
|
83
76
|
end
|
84
77
|
|
85
78
|
def permalink
|
@@ -100,6 +93,10 @@ module Jekyll
|
|
100
93
|
"concept.jsonld"
|
101
94
|
end
|
102
95
|
|
96
|
+
def uses_liquid
|
97
|
+
true
|
98
|
+
end
|
99
|
+
|
103
100
|
def permalink
|
104
101
|
"/api/concepts/#{termid}.jsonld"
|
105
102
|
end
|
@@ -118,6 +115,10 @@ module Jekyll
|
|
118
115
|
"concept.ttl"
|
119
116
|
end
|
120
117
|
|
118
|
+
def uses_liquid
|
119
|
+
true
|
120
|
+
end
|
121
|
+
|
121
122
|
def permalink
|
122
123
|
"/api/concepts/#{termid}.ttl"
|
123
124
|
end
|
@@ -136,6 +137,10 @@ module Jekyll
|
|
136
137
|
"concept.tbx.xml"
|
137
138
|
end
|
138
139
|
|
140
|
+
def uses_liquid
|
141
|
+
true
|
142
|
+
end
|
143
|
+
|
139
144
|
def permalink
|
140
145
|
"/api/concepts/#{termid}.tbx.xml"
|
141
146
|
end
|
@@ -155,8 +160,11 @@ module Jekyll
|
|
155
160
|
end
|
156
161
|
|
157
162
|
def content
|
158
|
-
|
159
|
-
|
163
|
+
ConceptSerializer.new(concept, site).to_yaml
|
164
|
+
end
|
165
|
+
|
166
|
+
def uses_liquid
|
167
|
+
false
|
160
168
|
end
|
161
169
|
|
162
170
|
def permalink
|
@@ -22,6 +22,7 @@ module Jekyll
|
|
22
22
|
|
23
23
|
make_pages
|
24
24
|
sort_pages
|
25
|
+
initialize_collections
|
25
26
|
group_pages_in_collections
|
26
27
|
end
|
27
28
|
|
@@ -46,6 +47,17 @@ module Jekyll
|
|
46
47
|
generated_pages.sort_by! { |p| p.termid.to_s }
|
47
48
|
end
|
48
49
|
|
50
|
+
def initialize_collections
|
51
|
+
%w[
|
52
|
+
concepts concepts_json concepts_jsonld
|
53
|
+
concepts_ttl concepts_tbx concepts_yaml
|
54
|
+
].each do |label|
|
55
|
+
next if site.collections[label]
|
56
|
+
site.config["collections"][label] ||= { "output" => true }
|
57
|
+
site.collections[label] = Jekyll::Collection.new(site, label)
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
49
61
|
def group_pages_in_collections
|
50
62
|
generated_pages.each do |page|
|
51
63
|
site.collections[page.collection_name].docs.push(page)
|
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.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-07-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -17,9 +17,12 @@ dependencies:
|
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 3.8.5
|
20
|
+
- - "!="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 4.1.0
|
20
23
|
- - "<"
|
21
24
|
- !ruby/object:Gem::Version
|
22
|
-
version: '4.
|
25
|
+
version: '4.2'
|
23
26
|
type: :runtime
|
24
27
|
prerelease: false
|
25
28
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -27,9 +30,12 @@ dependencies:
|
|
27
30
|
- - ">="
|
28
31
|
- !ruby/object:Gem::Version
|
29
32
|
version: 3.8.5
|
33
|
+
- - "!="
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: 4.1.0
|
30
36
|
- - "<"
|
31
37
|
- !ruby/object:Gem::Version
|
32
|
-
version: '4.
|
38
|
+
version: '4.2'
|
33
39
|
- !ruby/object:Gem::Dependency
|
34
40
|
name: jekyll-asciidoc
|
35
41
|
requirement: !ruby/object:Gem::Requirement
|
@@ -111,6 +117,7 @@ files:
|
|
111
117
|
- README.adoc
|
112
118
|
- _config.yml
|
113
119
|
- _data/lang.yaml
|
120
|
+
- _includes/analytics.html
|
114
121
|
- _includes/concept-api-links.html
|
115
122
|
- _includes/concept-header.html
|
116
123
|
- _includes/concept-info.html
|
@@ -120,6 +127,7 @@ files:
|
|
120
127
|
- _includes/concepts-list.html
|
121
128
|
- _includes/head.html
|
122
129
|
- _includes/localized-concept.html
|
130
|
+
- _includes/math-config.html
|
123
131
|
- _includes/newsroll-entry.html
|
124
132
|
- _includes/page-header.html
|
125
133
|
- _includes/resource-tree-item.html
|
@@ -165,7 +173,6 @@ files:
|
|
165
173
|
- assets/algolia-search.js
|
166
174
|
- assets/js/concept-search-worker.js
|
167
175
|
- assets/js/concept-search.js
|
168
|
-
- assets/js/ga.js
|
169
176
|
- assets/js/nav.js
|
170
177
|
- assets/js/resource-browser.js
|
171
178
|
- assets/logo-ribose.svg
|
data/assets/js/ga.js
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
(function () {
|
2
|
-
|
3
|
-
var gaid = document.documentElement.getAttribute('data-gaid');
|
4
|
-
|
5
|
-
if (gaid) {
|
6
|
-
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
7
|
-
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
8
|
-
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
9
|
-
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
10
|
-
|
11
|
-
ga('create', gaid, 'auto');
|
12
|
-
ga('send', 'pageview');
|
13
|
-
}
|
14
|
-
|
15
|
-
}());
|