jekyll-geolexica 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +6 -0
  3. data/README.adoc +102 -0
  4. data/_config.yml +88 -0
  5. data/_data/lang.yaml +96 -0
  6. data/_includes/_title.html +5 -0
  7. data/_includes/head.html +48 -0
  8. data/_includes/localized-concept.html +99 -0
  9. data/_includes/newsroll-entry.html +17 -0
  10. data/_includes/page-header.html +31 -0
  11. data/_includes/resource-tree-item.html +49 -0
  12. data/_includes/script.html +0 -0
  13. data/_layouts/base-page.html +7 -0
  14. data/_layouts/concept.html +154 -0
  15. data/_layouts/concept.jsonld.html +152 -0
  16. data/_layouts/concept.ttl.html +83 -0
  17. data/_layouts/custom-home.html +33 -0
  18. data/_layouts/custom-post.html +7 -0
  19. data/_layouts/default.html +176 -0
  20. data/_layouts/home.html +6 -0
  21. data/_layouts/page.html +6 -0
  22. data/_layouts/post.html +13 -0
  23. data/_layouts/posts.html +10 -0
  24. data/_layouts/resource-index.html +14 -0
  25. data/_layouts/resource-page.html +25 -0
  26. data/_pages/404.adoc +12 -0
  27. data/_pages/api/rdf-profile.ttl +225 -0
  28. data/_pages/concepts-index-list.json +24 -0
  29. data/_pages/concepts-index.json +14 -0
  30. data/_pages/concepts.adoc +38 -0
  31. data/_pages/index.adoc +8 -0
  32. data/_pages/posts.adoc +6 -0
  33. data/_pages/stats.adoc +18 -0
  34. data/_pages/stats.json +5 -0
  35. data/_sass/adoc-markup.scss +197 -0
  36. data/_sass/concept.scss +171 -0
  37. data/_sass/concepts.scss +18 -0
  38. data/_sass/expandable-nav.scss +187 -0
  39. data/_sass/geolexica_home.scss +174 -0
  40. data/_sass/home.scss +87 -0
  41. data/_sass/jekyll-theme-isotc211.scss +146 -0
  42. data/_sass/legacy-crossbrowser.scss +67 -0
  43. data/_sass/main.scss +413 -0
  44. data/_sass/mixins.scss +39 -0
  45. data/_sass/normalize.scss +424 -0
  46. data/_sass/offsets.scss +59 -0
  47. data/_sass/post.scss +16 -0
  48. data/_sass/posts.scss +18 -0
  49. data/assets/algolia-search.js +28 -0
  50. data/assets/js/concept-search-worker.js +103 -0
  51. data/assets/js/concept-search.js +293 -0
  52. data/assets/js/ga.js +15 -0
  53. data/assets/js/nav.js +125 -0
  54. data/assets/js/resource-browser.js +79 -0
  55. data/assets/logo-ribose.svg +1 -0
  56. data/assets/resource-viewer-placeholder.html +11 -0
  57. data/assets/style.scss +11 -0
  58. data/babel.config.js +16 -0
  59. data/browserconfig.xml +12 -0
  60. data/fonts/MetaWebPro-Normal.woff +0 -0
  61. data/fonts/MetaWebPro-Thin.woff +0 -0
  62. data/jekyll-geolexica.gemspec +45 -0
  63. data/lib/jekyll-geolexica.rb +5 -0
  64. data/lib/jekyll/geolexica.rb +19 -0
  65. data/lib/jekyll/geolexica/concept_page.rb +169 -0
  66. data/lib/jekyll/geolexica/concept_serializer.rb +44 -0
  67. data/lib/jekyll/geolexica/concepts_generator.rb +64 -0
  68. data/lib/jekyll/geolexica/configuration.rb +47 -0
  69. data/lib/jekyll/geolexica/glossary.rb +95 -0
  70. data/lib/jekyll/geolexica/hooks.rb +33 -0
  71. data/lib/jekyll/geolexica/meta_pages_generator.rb +58 -0
  72. data/lib/jekyll/geolexica/version.rb +8 -0
  73. data/package-lock.json +2921 -0
  74. data/package.json +10 -0
  75. metadata +209 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 357c378038e9d32edad712e02507a806c132527d80596e36680212a3f410390f
4
+ data.tar.gz: 83182053323349e9b98ecd381b03cf392edb8cf3980530308796bd33e4cc1038
5
+ SHA512:
6
+ metadata.gz: 2f8deda97f0fc5d9e2f60709fa2ef9fb40f7a59f10753f8d6059a8151437a60c2585bf159cf14c51c69e762db46c49f4656fc6810636c6e652d651fa041c79de
7
+ data.tar.gz: bc7a718ffca5a3a7c21bd88260182d3332fd179f950e40b25b9b9546c19534e76fbdb1e56495699cd9292767b755c514cd4e2869e1d2ff6a0a25bf88a23fbd8c
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ # (c) Copyright 2020 Ribose Inc.
2
+ #
3
+
4
+ source "https://rubygems.org"
5
+
6
+ gemspec
data/README.adoc ADDED
@@ -0,0 +1,102 @@
1
+ = ISO/TC 211 Geolexica Terminology Database
2
+
3
+ image:https://github.com/ISO-TC211/geolexica.org/workflows/build/badge.svg["Build Status", link="https://github.com/ISO-TC211/geolexica.org/actions?workflow=build"]
4
+
5
+ image:https://github.com/ISO-TC211/geolexica.org/workflows/deploy-master/badge.svg["Build Status", link="https://github.com/ISO-TC211/geolexica.org/actions?workflow=deploy-master"]
6
+
7
+ image:https://github.com/ISO-TC211/geolexica.org/workflows/deploy-staging/badge.svg["Build Status", link="https://github.com/ISO-TC211/geolexica.org/actions?workflow=deploy-staging"]
8
+
9
+
10
+ == Introduction
11
+
12
+ Geolexica is the site name of the online version of the ISO/TC 211 Multi Lingual Glossary of Terms.
13
+
14
+ This repository contains the source of the https://www.geolexica.org site.
15
+
16
+ The site is managed by the ISO/TC 211 TMG together with Ribose.
17
+
18
+ NOTE: This repository is only meant for internal consumption!
19
+
20
+
21
+ == How to add/remove entries or suggest changes?
22
+
23
+ For change suggestions, contact ISO/TC 211 TMG.
24
+
25
+ This terminology database is managed by the ISO/TC 211 TMG, and it only considers
26
+ requests from within ISO/TC 211. The database is not directly community-managed or community-sourced.
27
+
28
+
29
+ == ISO/TC 211 MLGT component overview
30
+
31
+ Components involved in ISO/TC 211 MLGT solution:
32
+
33
+ . Geolexica.org: **this repository**.
34
+ Renders Geolexica database into HTML, JSON-LD and other Web-friendly formats.
35
+
36
+ . Geolexica database:
37
+ see https://github.com/geolexica/geolexica-database[geolexica/geolexica-database].
38
+ Hosts all concept data in YAML;
39
+ bundles facilities for converting authoritative spreadsheet data into YAML.
40
+ Candidate to become authoritative source, contingent upon factual usage of Glossarist by TMG.
41
+
42
+ . Manually managed XLST spreadsheets (1.0 workflow):
43
+ see https://github.com/ISO-TC211/mlgt-data[ISO-TC211/mlgt-data].
44
+ Currently the authoritative source in 1.0 workflow.
45
+ Will be phased out in favor of Geolexica database in 2.0.
46
+
47
+ . Glossarist desktop application (2.0 workflow):
48
+ see https://github.com/geolexica/geolexica-desktop[geolexica/geolexica-desktop].
49
+ Will be used to manage the Geolexica database in 2.0 workflow.
50
+
51
+
52
+ === Change lifecycle (1.0, current)
53
+
54
+ . Requested changes are directed to ISO/TC 211 TMG.
55
+
56
+ . When a change is approved, TMG publishes a new version of ISO/TC 211 "`Multi-Lingual Glossary of Terms`".
57
+
58
+ . TMG uploads the new MLGT version to mlgt-data repository.
59
+
60
+ . From the updated mlgt-data, a new snapshot of the database is created in geolexica-database repository.
61
+
62
+ . After new snapshot of the database is committed to geolexica-database,
63
+ ISO/TC 211’s Geolexica.org is deployed with the latest database version.
64
+
65
+
66
+ === Change lifecycle (2.0, near future)
67
+
68
+ . Requested changes are directed to ISO/TC 211 TMG.
69
+
70
+ . Adding, updating, approving concepts & terms in ISO/TC 211 Geolexica database
71
+ is done by TMG using the desktop application under development.
72
+
73
+ . As changes are made, new versions of Geolexica database are created,
74
+ and ISO/TC 211’s Geolexica.org is deployed with the latest database version.
75
+
76
+
77
+ == Internal operations
78
+
79
+ NOTE: These steps are only intended for the internal operator of the site!
80
+
81
+
82
+ === Building the site
83
+
84
+ . Ensure geolexica-database submodule is up-to-date.
85
+
86
+ . Run ``make _site``
87
+
88
+
89
+ === Deployment
90
+
91
+ Please push all changes to the `staging` branch, and changes will be automatically deployed and reflected on the staging site.
92
+
93
+ If your changes are to be made public to the production site, please contact Ribose.
94
+
95
+
96
+ === Rendering of HTML
97
+
98
+ Jekyll is used to render YAML into HTML.
99
+
100
+ NOTE: Since Jekyll Collections have this flaw where YAML files can't be directly
101
+ rendered, a hack is implemented in the Makefile `_concepts` target,
102
+ so that every YAML file is converted into AsciiDoc by padding `---` at the end.
data/_config.yml ADDED
@@ -0,0 +1,88 @@
1
+ title: A Geolexica site
2
+
3
+ font_awesome_kit_url: https://kit.fontawesome.com/77a8a07e0a.js
4
+
5
+ has_brand_name: yes
6
+ always_show_committee_link_on_landing: yes
7
+
8
+ nav:
9
+ items:
10
+ - id: concepts
11
+ url: /concepts
12
+ title: Concepts
13
+ description: List of all concepts
14
+ - id: posts
15
+ url: /posts
16
+ title: News & Articles
17
+ - id: stats
18
+ url: /stats
19
+ title: Statistics
20
+ description: Per-language term statistics
21
+ - id: about
22
+ url: /about
23
+ title: About
24
+
25
+ email: open.source@ribose.com
26
+
27
+ powered_by:
28
+ url: https://open.ribose.com
29
+ title: Ribose
30
+ logo_path: /assets/logo-ribose.svg
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
+ geolexica:
58
+ concepts_glob: "./geolexica-database/concepts/*.yaml"
59
+ term_languages:
60
+ - eng
61
+ formats:
62
+ - html
63
+
64
+ exclude:
65
+ - spec/
66
+
67
+ - "*.xlsx"
68
+ - "*.yaml"
69
+
70
+ - Gemfile
71
+ - Gemfile.lock
72
+ - Makefile
73
+
74
+ - babel.config.js
75
+ - package.json
76
+ - package-lock.json
77
+ - monitor.sh
78
+ - node_modules
79
+
80
+ - deploy.sh
81
+ - monitor.sh
82
+
83
+ - .sass-cache/
84
+
85
+ - vendor/bundle/
86
+ - vendor/cache/
87
+ - vendor/gems/
88
+ - vendor/ruby/
data/_data/lang.yaml ADDED
@@ -0,0 +1,96 @@
1
+ ara:
2
+ lang_native: العربية
3
+ lang_en: Arabic
4
+ iso-639-1: ar
5
+ example: "مثال"
6
+ note_to_entry: "ملاحظة DD:"
7
+ dan:
8
+ lang_native: dansk
9
+ lang_en: Danish
10
+ iso-639-1: da
11
+ example: EKSEMPEL
12
+ note_to_entry: "Bemærk DD til posten:"
13
+ deu:
14
+ lang_native: Deutsch
15
+ lang_en: German
16
+ iso-639-1: de
17
+ example: BEISPIEL
18
+ note_to_entry: "NOTE DD:"
19
+ eng:
20
+ lang_native: English
21
+ lang_en: English
22
+ iso-639-1: en
23
+ example: EXAMPLE
24
+ note_to_entry: "Note DD to entry:"
25
+ fin:
26
+ lang_native: suomi
27
+ lang_en: Finnish
28
+ iso-639-1: fi
29
+ example: ESIM.
30
+ note_to_entry: "HUOM. DD:"
31
+ fra:
32
+ lang_native: français
33
+ lang_en: French
34
+ iso-639-1: fr
35
+ example: EXEMPLE
36
+ note_to_entry: "Note DD à l'article:"
37
+ jpn:
38
+ lang_native: 日本語
39
+ lang_en: Japanese
40
+ iso-639-1: ja
41
+ example: 例
42
+ note_to_entry: "備考 DD:"
43
+ kor:
44
+ lang_native: 한국어
45
+ lang_en: Korean
46
+ iso-639-1: ko
47
+ example: 보기
48
+ note_to_entry: "비고 DD:"
49
+ msa:
50
+ lang_native: Bahasa melayu
51
+ lang_en: Malay
52
+ iso-639-1: ms
53
+ example: Contoh
54
+ note_to_entry: "catatan DD:"
55
+ nld:
56
+ lang_native: Nederlands
57
+ lang_en: Dutch
58
+ iso-639-1: nl
59
+ example: VOORBEELD
60
+ note_to_entry: "OPMERKING DD:"
61
+ pol:
62
+ lang_native: polski
63
+ lang_en: Polish
64
+ iso-639-1: pl
65
+ example: PRZYKŁAD
66
+ note_to_entry: "UWAGA DD:"
67
+ por:
68
+ lang_native: português
69
+ lang_en: Portuguese
70
+ iso-639-1: pt
71
+ exemplo: EXEMPLO
72
+ note_to_entry: "Anote o DD na entrada:"
73
+ rus:
74
+ lang_native: Русский язык
75
+ lang_en: Russian
76
+ iso-639-1: ru
77
+ example: Пример
78
+ note_to_entry: "Примечание DD:"
79
+ spa:
80
+ lang_native: español
81
+ lang_en: Spanish
82
+ iso-639-1: es
83
+ example: EJEMPLO
84
+ note_to_entry: "Nota DD:"
85
+ swe:
86
+ lang_native: Svenska
87
+ lang_en: Swedish
88
+ iso-639-1: sv
89
+ example: EXEMPEL
90
+ note_to_entry: "Anm. DD till termpost:"
91
+ zho:
92
+ lang_native: 中文
93
+ lang_en: Chinese
94
+ iso-639-1: zh
95
+ example: 示例
96
+ note_to_entry: "注 DD:"
@@ -0,0 +1,5 @@
1
+ {% if page.term %}{{ page.term | escape }} —
2
+ {% elsif page.title %}{{ page.title | escape }} —
3
+ {% else %}{{ site.title | escape }} —
4
+ {% endif %}
5
+ {{ site.description }}
@@ -0,0 +1,48 @@
1
+ <head>
2
+ <meta charset="utf-8">
3
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
4
+ <meta name="viewport" content="width=device-width, initial-scale=1">
5
+
6
+ <title>{% include _title.html %}</title>
7
+
8
+ <link rel="icon" type="image/png" href="/images/favicon-32x32.png" sizes="32x32" />
9
+ <link rel="icon" type="image/png" href="/images/android-chrome-192x192.png" sizes="192x192" />
10
+ <link rel="icon" type="image/png" href="/images/favicon-96x96.png" sizes="96x96" />
11
+ <link rel="icon" type="image/png" href="/images/favicon-16x16.png" sizes="16x16" />
12
+ <link rel="shortcut icon" href="/favicon.ico" />
13
+
14
+ <meta name="msapplication-TileColor" content="#ffffff" />
15
+ <meta name="msapplication-TileImage" content="/images/mstile-144x144.png" />
16
+ <meta name="msapplication-config" content="/browserconfig.xml" />
17
+ <meta name="theme-color" content="#ffffff" />
18
+
19
+ <link rel="canonical" href="{{ page.url | replace: 'index.html', '' | relative_url }}" />
20
+
21
+ {% assign extra_stylesheets = page.extra_stylesheets | default: layout.extra_stylesheets %}
22
+ {% if extra_stylesheets %}
23
+ {% for ss in extra_stylesheets %}
24
+ <link rel="stylesheet"
25
+ href="{{ ss.href }}"
26
+ {% if ss.integrity %}integrity="{{ ss.integrity }}"{% endif %}
27
+ {% if ss.crossorigin %}crossorigin="{{ ss.crossorigin }}"{% endif %}>
28
+ {% endfor %}
29
+ {% endif %}
30
+
31
+ {% if site.font_awesome_kit_url %}
32
+ <script src="{{ site.font_awesome_kit_url }}"></script>
33
+ {% endif %}
34
+
35
+ <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
36
+ <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
37
+ <!--[if lt IE 9]>
38
+ <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
39
+ <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
40
+ <![endif]-->
41
+
42
+ <link rel="stylesheet" type="text/css" href="{{ "/assets/style.css" | relative_url }}" />
43
+
44
+ {% if jekyll.environment == 'production' and site.google_analytics %}
45
+ <script src="{{ "/assets/js/ga.js" | relative_url }}"></script>
46
+ {% endif %}
47
+
48
+ </head>
@@ -0,0 +1,99 @@
1
+ {%- assign term_status = english.entry_status -%}
2
+ {%- assign classification = english.terms.first.normative_status -%}
3
+ <article
4
+ class="localized-term field lang-{{ lang }} status-{{ term_status }} classification-{{ classification }}"
5
+ id="entry-lang-{{ lang }}">
6
+
7
+ <p class="field-name field-name-language">{{ lang }}</p>
8
+
9
+ <div class="field-value">
10
+ {% for entry in localized_term.terms %}
11
+ <h3 class="localized">{{ entry.designation | escape }}</h3>
12
+ {% else %}
13
+ <h3 class="warning">Translated term missing in this language.</h3>
14
+ {% endfor %}
15
+
16
+ {% if localized_term.abbrev %}
17
+ <p class="localized abbrev">{{ localized_term.abbrev | escape }}</p>
18
+ {% endif %}
19
+
20
+ {% if localized_term.definition %}
21
+ <p class="definition localized">{{ localized_term.definition | escape }}</p>
22
+ {% else %}
23
+ <p class="definition warning">Definition not provided in this language.</p>
24
+ {% endif %}
25
+
26
+ {% if localized_term.authoritative_source.ref != english.authoritative_source.ref %}
27
+ {% if localized_term.authoritative_source.link %}
28
+ <p class="source localized">
29
+ [SOURCE: <a href="{{ localized_term.authoritative_source.link }}">
30
+ {{ localized_term.authoritative_source.ref }}</a>{% if localized_term.authoritative_source.clause %}, {{ localized_term.authoritative_source.clause }}{% endif %}]
31
+ </p>
32
+ {% else %}
33
+ <p class="source localized">
34
+ [SOURCE: {{ localized_term.authoritative_source.ref }}{% if localized_term.authoritative_source.clause %}, {{ localized_term.authoritative_source.clause }}{% endif %}]
35
+ </p>
36
+ {% endif %}
37
+ <span class="warning">
38
+ This translated term may not be from the same source as the definitive term. Use at your own risk.
39
+ </span>
40
+ {% endif %}
41
+
42
+ {% if localized_term.notes %}
43
+ <div class="notes">
44
+ {% for note in localized_term.notes %}
45
+ {% assign notenum = "" %}
46
+ {% if localized_term.notes.size > 1 %}
47
+ {% assign notenum = " " | append: forloop.index %}
48
+ {% endif %}
49
+ <p class="note localized">
50
+ <span>
51
+ {{ site.data.lang[lang].note_to_entry | replace: " DD", notenum }}
52
+ </span>
53
+ {% if lang != "eng" and note == english.notes[forloop.index0] %}
54
+ <span class="warning">
55
+ This note has not been translated.
56
+ </span>
57
+ {% else %}
58
+ {{ note | escape }}
59
+ {% endif %}
60
+ </p>
61
+ {% endfor %}
62
+ </div>
63
+ {% endif %}
64
+
65
+ {% if localized_term.examples %}
66
+ <div class="examples">
67
+ {% for example in localized_term.examples %}
68
+ <p class="example localized">
69
+ <span>{{ site.data.lang[lang].example }}
70
+ {% if localized_term.examples.size > 1 %}
71
+ {{ forloop.index }}
72
+ {% endif %}
73
+ </span>
74
+ {% if lang != "eng" and example == english.examples[forloop.index0] %}
75
+ <span class="warning">
76
+ This example has not been translated.
77
+ </span>
78
+ {% else %}
79
+ {{ example | escape }}
80
+ {% endif %}
81
+ </p>
82
+ {% endfor %}
83
+ </div>
84
+ {% endif %}
85
+
86
+ <ul class="labels">
87
+ {% if localized_term.alt %}
88
+ <li><span class="localized">{{ localized_term.alt | escape }}</span></li>
89
+ {% endif %}
90
+ </ul>
91
+
92
+ <p class="origin localized">
93
+ ORIGIN:
94
+ <a href="/registers/#language-{{ lang }}">{{ site.data.info.languages[lang].register-name }}</a>
95
+ (last updated: {{ site.data.info.languages[lang].date-of-last-change }})
96
+ </p>
97
+
98
+ </div>
99
+ </article>