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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 16b61fec651a03fc3c31bf870fd9f0aa26002c383d3b6c7a7f8cc0cbccc9533f
4
- data.tar.gz: e3b92ffc63f563b35a208b21c24c52a53749cde74f0318c974d778e65a07188c
3
+ metadata.gz: df419dc2ad54d36d0ab4de9d534550b154dcb2b2a9a40b660d357ff692c6ec55
4
+ data.tar.gz: 1a9de9ac8025af15d280176c45775ddb0aafdb3f1cc87d3007e424088eb66eae
5
5
  SHA512:
6
- metadata.gz: 9a94b9b84a67cb1f4b7245c7f36cd2d034db1463d7e49d4f35d8a51e23005c4839076b74315964fa6cf29583df45b7a9c3e143160bb9602b3d8203d2ab786896
7
- data.tar.gz: f2001b4ad79f50a36e4165f36d715c413f0a492113079795123b4dac54db3ec4c9210edb0fa150c3b94b5e4ca64f951744726b63b87636a280005b00702aa397
6
+ metadata.gz: df6a8124c544aafcd635e8725a5d3807294bae06a503988c48042294f2f685b4b9a6fa5f3d459088a9f4705ba4ac571032eee2e4b2d46bc130b4f280b6feba2e
7
+ data.tar.gz: d8c7ab3b25e6676741ccd06e7971bcc1075779de3ec5ceffffc8946fc7fb1d37608ec0415448ef7c1dc1d13371919239dcc93327bda8379597321f6a87d43fdc
@@ -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 -%}
@@ -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>
@@ -37,7 +37,7 @@
37
37
  </p>
38
38
  {% endif %}
39
39
  <span class="warning">
40
- This translated term may not be from the same source as the definitive term. Use at your own risk.
40
+ This translated term may not be from the same source as the normative term.
41
41
  </span>
42
42
  {% endif %}
43
43
 
@@ -0,0 +1,7 @@
1
+ {% comment %}
2
+ <script type="text/javascript">
3
+ // Here configure MathJax, if needed.
4
+ </script>
5
+ {% endcomment -%}
6
+
7
+ <script id="MathJax-script" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
@@ -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 -}}
@@ -18,8 +18,6 @@ term_attributes:
18
18
  - review_decision_notes
19
19
  - release
20
20
  ---
21
- {%- assign english = page["eng"] -%}
22
-
23
21
  {% include concept-header.html %}
24
22
 
25
23
  {% include concept-lead-info.html %}
@@ -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>
@@ -108,7 +108,7 @@ body.concept {
108
108
  padding-top: 1em;
109
109
  padding-bottom: 1em;
110
110
 
111
- @media screen and (max-width: $bigscreenBreakpoint) {
111
+ @media screen and (max-width: $bigscreenBreakpoint - 1) {
112
112
  &.field {
113
113
  display: block;
114
114
  }
@@ -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;
@@ -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
- spec.add_runtime_dependency "jekyll", ">= 3.8.5", "< 4.1"
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
- s = ConceptSerializer.new(concept, site)
82
- escape_liquid(s.to_json)
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
- s = ConceptSerializer.new(concept, site)
159
- escape_liquid(s.to_yaml)
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)
@@ -3,6 +3,6 @@
3
3
 
4
4
  module Jekyll
5
5
  module Geolexica
6
- VERSION = "1.2.2".freeze
6
+ VERSION = "1.4.0".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.2.2
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-06-06 00:00:00.000000000 Z
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.1'
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.1'
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
@@ -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
- }());