jekyll-theme-jod 0.2.6 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +23 -2
- data/_includes/navigation.html +40 -8
- data/_includes/ontology-head.html +17 -17
- data/_layouts/ontology.html +58 -5
- metadata +13 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5cdf8e0554413e21efd14db7a30e12995650141f94101811443cd65510d11022
|
4
|
+
data.tar.gz: a43859104a371e296cc55757f09b10e67926e0357f59ba28893f60a6d022ba90
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 15bd7ac3c908e9c361c615f370e25fd239f2cc5968452a1d4f73cd1aacb5aadd58039b390c976303329d88a62ef0de3db824093a544b4aeb99a6d5138f20a8f0
|
7
|
+
data.tar.gz: 81d020e11a03a619ab39e7885df2db590785b6b44aff2f331343d8b17f54da2b45b63a26fc241d4276244f248d0ed1a3917bdb7035a5dfb5c7d2f9c5c30a6996
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
The JOD project generates documentation web pages from Ontology turtle documents.
|
4
4
|
|
5
|
-
JOD is based on [jekyll](jekyllrb.com) as well as the wonderful [jekyll-rdf plugin](https://github.com/
|
5
|
+
JOD is based on [jekyll](jekyllrb.com) as well as the wonderful [jekyll-rdf plugin](https://github.com/aksw/jekyll-rdf) and creates web pages which use [Bootstrap 4](https://getbootstrap.com/) as a front-end component library.
|
6
6
|
|
7
7
|
## Status
|
8
8
|
|
@@ -35,6 +35,23 @@ Or install it yourself as:
|
|
35
35
|
|
36
36
|
TODO: Write usage instructions here. Describe your available layouts, includes, and/or sass.
|
37
37
|
|
38
|
+
## Docker
|
39
|
+
|
40
|
+
There is also a docker container, that hides away all of the jekyll and jekyll-rdf specific configuration.
|
41
|
+
It currently is available at the GitHub Container Registry as `ghcr.io/eccenca/jod:main`.
|
42
|
+
|
43
|
+
As preparation your ontology should be available as `ontology.ttl` in the current directory.
|
44
|
+
Specify the base URL for the Jod documentation as `JOD_URL` (mandatory).
|
45
|
+
You can overwrite the ontologies title with `JOD_TITLE`.
|
46
|
+
The switch `JOD_RESTRICTION_URL` configures jod to only build resources with the configured base URL (this brings some speed up).
|
47
|
+
To use your own configuration you can overwrite the docker run command, e.g. `jekyll build --disable-disk-cache --config _config.yml`. Checkout the [Jekyll RDF documentation for details](https://github.com/AKSW/jekyll-rdf).
|
48
|
+
|
49
|
+
```
|
50
|
+
docker run --rm -v .:/data -e JOD_URL=http://example.org -e JOD_RESTRICTION_URL=True ghcr.io/eccenca/jod:main
|
51
|
+
```
|
52
|
+
|
53
|
+
Will produce a directory `_site` with the generated documentation.
|
54
|
+
|
38
55
|
## Contributing
|
39
56
|
|
40
57
|
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/hello. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
@@ -51,10 +68,14 @@ When your theme is released, only the files in `_layouts`, `_includes`, and `_sa
|
|
51
68
|
|
52
69
|
The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT). Take a look at the `LICENSE` file.
|
53
70
|
|
54
|
-
## Screenshot
|
71
|
+
## Examples and Screenshot
|
55
72
|
|
56
73
|

|
57
74
|
|
75
|
+
Examples of using jod
|
76
|
+
- [diggr Video Game Vocabulary](https://diggr.github.io/diggr-video-game-vocabulary/) ([repo](https://github.com/diggr/diggr-video-game-vocabulary))
|
77
|
+
- [GND Ontology](https://d-nb.info/standards/elementset/gnd)
|
78
|
+
|
58
79
|
## Related Projects
|
59
80
|
|
60
81
|
- [Widoco](https://github.com/dgarijo/Widoco), a Wizard for documenting ontologies
|
data/_includes/navigation.html
CHANGED
@@ -20,22 +20,51 @@ style="position: -webkit-sticky;
|
|
20
20
|
|
21
21
|
<ul class="nav nav-pills flex-column" id="search-list">
|
22
22
|
{% for result in classesResultset %}
|
23
|
+
{%- if forloop.first %}
|
24
|
+
<li class="list-group-item list-group-item-dark disabled"><div class="fw-bold">Classes</div></li>
|
25
|
+
{% endif -%}
|
23
26
|
<li class="nav-item">
|
24
|
-
<a class="nav-link" href="#id-{{ result.subject.iri | md5 }}">
|
27
|
+
<a search-string="class" class="nav-link" href="#id-{{ result.subject.iri | md5 }}">
|
28
|
+
{% include label.html iri = result.subject.iri %}
|
29
|
+
</a>
|
30
|
+
</li>
|
31
|
+
{% endfor %}
|
32
|
+
{% for result in rdfPropertiesResultset %}
|
33
|
+
{%- if forloop.first %}
|
34
|
+
<li class="list-group-item list-group-item-dark disabled"><div class="fw-bold">RDF Properties</div></li>
|
35
|
+
{% endif -%}
|
36
|
+
<li class="nav-item">
|
37
|
+
<a search-string="rdf property" class="nav-link" href="#id-{{ result.subject.iri | md5 }}">
|
25
38
|
{% include label.html iri = result.subject.iri %}
|
26
39
|
</a>
|
27
40
|
</li>
|
28
41
|
{% endfor %}
|
29
42
|
{% for result in objectPropertiesResultset %}
|
43
|
+
{%- if forloop.first %}
|
44
|
+
<li class="list-group-item list-group-item-dark disabled"><div class="fw-bold">Object Properties</div></li>
|
45
|
+
{% endif -%}
|
30
46
|
<li class="nav-item">
|
31
|
-
<a class="nav-link" href="#id-{{ result.subject.iri | md5 }}">
|
47
|
+
<a search-string="object property" class="nav-link" href="#id-{{ result.subject.iri | md5 }}">
|
32
48
|
{% include label.html iri = result.subject.iri %}
|
33
49
|
</a>
|
34
50
|
</li>
|
35
51
|
{% endfor %}
|
36
52
|
{% for result in datatypePropertiesResultset %}
|
53
|
+
{%- if forloop.first %}
|
54
|
+
<li class="list-group-item list-group-item-dark disabled"><div class="fw-bold">Datatype Properties</div></li>
|
55
|
+
{% endif -%}
|
56
|
+
<li class="nav-item">
|
57
|
+
<a search-string="datatype proeprty" class="nav-link" href="#id-{{ result.subject.iri | md5 }}">
|
58
|
+
{% include label.html iri = result.subject.iri %}
|
59
|
+
</a>
|
60
|
+
</li>
|
61
|
+
{% endfor %}
|
62
|
+
{% for result in namedIndividualsResultset %}
|
63
|
+
{%- if forloop.first %}
|
64
|
+
<li class="list-group-item list-group-item-dark disabled"><div class="fw-bold">Named Individuals</div></li>
|
65
|
+
{% endif -%}
|
37
66
|
<li class="nav-item">
|
38
|
-
<a class="nav-link" href="#id-{{ result.subject.iri | md5 }}">
|
67
|
+
<a search-string="named individual" class="nav-link" href="#id-{{ result.subject.iri | md5 }}">
|
39
68
|
{% include label.html iri = result.subject.iri %}
|
40
69
|
</a>
|
41
70
|
</li>
|
@@ -53,11 +82,14 @@ style="position: -webkit-sticky;
|
|
53
82
|
// Loop through all list items, and hide those who don't match the search query
|
54
83
|
for (i = 0; i < li.length; i++) {
|
55
84
|
a = li[i].getElementsByTagName("a")[0];
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
85
|
+
if (a != undefined) {
|
86
|
+
txtValue = a.textContent || a.innerText;
|
87
|
+
txtValue = txtValue + a.getAttribute("search-string");
|
88
|
+
if (txtValue.toUpperCase().indexOf(filter) > -1) {
|
89
|
+
li[i].style.display = "";
|
90
|
+
} else {
|
91
|
+
li[i].style.display = "none";
|
92
|
+
}
|
61
93
|
}
|
62
94
|
}
|
63
95
|
}
|
@@ -56,33 +56,33 @@
|
|
56
56
|
<dt>Preferred Namespace URI</dt>
|
57
57
|
<dd>{{- vannPreferredNamespaceUri -}}</dd>
|
58
58
|
{%- endif -%}
|
59
|
+
{%- assign foafDepiction = page.rdf | rdf_property: 'foaf:depiction' -%}
|
60
|
+
{%- if foafDepiction -%}
|
61
|
+
<dd><img src="{{- foafDepiction -}}"/></dd>
|
62
|
+
{%- endif -%}
|
59
63
|
</dl>
|
60
64
|
</p>
|
61
65
|
<hr class="my-4">
|
62
|
-
<p>
|
63
|
-
|
64
|
-
<a class="btn btn-primary btn-lg" href="#classes" role="button">
|
66
|
+
<p style="line-height: 3.3rem;">
|
67
|
+
<a class="btn btn-primary btn-lg {% unless countClass > 0 %}disabled{% endunless %}" href="#classes" role="button">
|
65
68
|
Classes
|
66
|
-
<span class="badge badge-light">{{
|
69
|
+
<span class="badge badge-light">{{ countClass }}</span>
|
67
70
|
</a>
|
68
|
-
|
69
|
-
{% for result in countRdfPropertiesResultSet %}
|
70
|
-
<a class="btn btn-primary btn-lg" href="#rdfProperties" role="button">
|
71
|
+
<a class="btn btn-primary btn-lg {% unless countRdfProperties > 0 %}disabled{% endunless %}" href="#rdfProperties" role="button">
|
71
72
|
RDF Properties
|
72
|
-
<span class="badge badge-light">{{
|
73
|
+
<span class="badge badge-light">{{ countRdfProperties }}</span>
|
73
74
|
</a>
|
74
|
-
|
75
|
-
{% for result in countObjectPropertiesResultSet %}
|
76
|
-
<a class="btn btn-primary btn-lg" href="#objectProperties" role="button">
|
75
|
+
<a class="btn btn-primary btn-lg {% unless countObjectProperties > 0 %}disabled{% endunless %}" href="#objectProperties" role="button">
|
77
76
|
Object Properties
|
78
|
-
<span class="badge badge-light">{{
|
77
|
+
<span class="badge badge-light">{{ countObjectProperties}}</span>
|
79
78
|
</a>
|
80
|
-
|
81
|
-
{%- for result in countDatatypePropertiesResultSet -%}
|
82
|
-
<a class="btn btn-primary btn-lg" href="#datatypeProperties" role="button">
|
79
|
+
<a class="btn btn-primary btn-lg {% unless countDatatypeProperties > 0 %}disabled{% endunless %}" href="#datatypeProperties" role="button">
|
83
80
|
Datatype Properties
|
84
|
-
<span class="badge badge-light">{{
|
81
|
+
<span class="badge badge-light">{{ countDatatypeProperties }}</span>
|
82
|
+
</a>
|
83
|
+
<a class="btn btn-primary btn-lg {% unless countNamedIndividuals > 0 %}disabled{% endunless %}" href="#namedIndividuals" role="button">
|
84
|
+
Named Individuals
|
85
|
+
<span class="badge badge-light">{{ countNamedIndividuals }}</span>
|
85
86
|
</a>
|
86
|
-
{%- endfor -%}
|
87
87
|
</p>
|
88
88
|
</div>
|
data/_layouts/ontology.html
CHANGED
@@ -94,6 +94,45 @@ rdf_prefix_path: "_data/prefixes.pref"
|
|
94
94
|
' %}
|
95
95
|
{% assign countDatatypePropertiesResultSet = page.rdf | sparql_query: countDatatypePropertiesQuery %}
|
96
96
|
|
97
|
+
{% assign namedIndividualsQuery = '
|
98
|
+
SELECT DISTINCT ?subject
|
99
|
+
WHERE
|
100
|
+
{
|
101
|
+
?subject a ?class .
|
102
|
+
FILTER ( ?class IN (owl:NamedIndividual) )
|
103
|
+
FILTER isIRI(?subject)
|
104
|
+
}
|
105
|
+
ORDER BY ?label' %}
|
106
|
+
{% assign namedIndividualsResultset = page.rdf | sparql_query: namedIndividualsQuery %}
|
107
|
+
|
108
|
+
{% assign countNamedIndividualsQuery = '
|
109
|
+
SELECT DISTINCT (COUNT(?subject) as ?namedIndividuals)
|
110
|
+
WHERE
|
111
|
+
{
|
112
|
+
?subject a ?class .
|
113
|
+
FILTER ( ?class IN (owl:NamedIndividual) )
|
114
|
+
FILTER isIRI(?subject)
|
115
|
+
}
|
116
|
+
' %}
|
117
|
+
{% assign countNamedIndividualsResultSet = page.rdf | sparql_query: countNamedIndividualsQuery %}
|
118
|
+
|
119
|
+
|
120
|
+
{% for result in countClassResultSet %}
|
121
|
+
{% assign countClass = result.classes | plus: 0 %}
|
122
|
+
{% endfor %}
|
123
|
+
{% for result in countRdfPropertiesResultSet %}
|
124
|
+
{% assign countRdfProperties = result.rdfProperties | plus: 0 %}
|
125
|
+
{% endfor %}
|
126
|
+
{% for result in countObjectPropertiesResultSet %}
|
127
|
+
{% assign countObjectProperties = result.objectProperties | plus: 0 %}
|
128
|
+
{% endfor %}
|
129
|
+
{% for result in countDatatypePropertiesResultSet %}
|
130
|
+
{% assign countDatatypeProperties = result.datatypeProperties | plus: 0 %}
|
131
|
+
{% endfor %}
|
132
|
+
{% for result in countNamedIndividualsResultSet %}
|
133
|
+
{% assign countNamedIndividuals = result.namedIndividuals | plus: 0 %}
|
134
|
+
{% endfor %}
|
135
|
+
|
97
136
|
<div class="container-fluid">
|
98
137
|
<div class="row">
|
99
138
|
{% include navigation.html iri = result.subject.iri %}
|
@@ -101,24 +140,38 @@ rdf_prefix_path: "_data/prefixes.pref"
|
|
101
140
|
<main role="main" class="container col-sm-9 col-md-10 col-lg-8 col-xl-7">
|
102
141
|
{% include ontology-head.html iri = result.subject.iri %}
|
103
142
|
|
104
|
-
<h2 id="classes">Overview</h2>
|
105
|
-
<h2 id="classes">Classes</h2>
|
106
143
|
{% for result in classesResultset %}
|
144
|
+
{%- if forloop.first %}
|
145
|
+
<h2 id="classes">Classes</h2>
|
146
|
+
{% endif -%}
|
107
147
|
<p>{% include class-card.html iri = result.subject.iri %}</p>
|
108
148
|
{% endfor %}
|
109
149
|
|
110
|
-
<h2 id="rdfProperties">RDF Properties</h2>
|
111
150
|
{% for result in rdfPropertiesResultset %}
|
151
|
+
{%- if forloop.first %}
|
152
|
+
<h2 id="rdfProperties">RDF Properties</h2>
|
153
|
+
{% endif -%}
|
112
154
|
<p>{% include class-card.html iri = result.subject.iri %}</p>
|
113
155
|
{% endfor %}
|
114
156
|
|
115
|
-
<h2 id="objectProperties">Object Properties</h2>
|
116
157
|
{% for result in objectPropertiesResultset %}
|
158
|
+
{%- if forloop.first %}
|
159
|
+
<h2 id="objectProperties">Object Properties</h2>
|
160
|
+
{% endif -%}
|
117
161
|
<p>{% include class-card.html iri = result.subject.iri %}</p>
|
118
162
|
{% endfor %}
|
119
163
|
|
120
|
-
<h2 id="datatypeProperties">Datatype Properties</h2>
|
121
164
|
{% for result in datatypePropertiesResultset %}
|
165
|
+
{%- if forloop.first %}
|
166
|
+
<h2 id="datatypeProperties">Datatype Properties</h2>
|
167
|
+
{% endif -%}
|
168
|
+
<p>{% include class-card.html iri = result.subject.iri %}</p>
|
169
|
+
{% endfor %}
|
170
|
+
|
171
|
+
{% for result in namedIndividualsResultset %}
|
172
|
+
{%- if forloop.first %}
|
173
|
+
<h2 id="namedIndividuals">Named Individuals</h2>
|
174
|
+
{% endif -%}
|
122
175
|
<p>{% include class-card.html iri = result.subject.iri %}</p>
|
123
176
|
{% endfor %}
|
124
177
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-theme-jod
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sebastian Tramp
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2025-10-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: jekyll
|
@@ -31,14 +31,14 @@ dependencies:
|
|
31
31
|
requirements:
|
32
32
|
- - "~>"
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: '
|
34
|
+
version: '4.0'
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
39
|
- - "~>"
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: '
|
41
|
+
version: '4.0'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: liquid-md5
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
@@ -87,14 +87,20 @@ dependencies:
|
|
87
87
|
requirements:
|
88
88
|
- - "~>"
|
89
89
|
- !ruby/object:Gem::Version
|
90
|
-
version: '
|
90
|
+
version: '13.0'
|
91
|
+
- - ">="
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: 13.0.6
|
91
94
|
type: :development
|
92
95
|
prerelease: false
|
93
96
|
version_requirements: !ruby/object:Gem::Requirement
|
94
97
|
requirements:
|
95
98
|
- - "~>"
|
96
99
|
- !ruby/object:Gem::Version
|
97
|
-
version: '
|
100
|
+
version: '13.0'
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 13.0.6
|
98
104
|
description:
|
99
105
|
email:
|
100
106
|
- sebastian.tramp@eccenca.com
|
@@ -135,7 +141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
135
141
|
- !ruby/object:Gem::Version
|
136
142
|
version: '0'
|
137
143
|
requirements: []
|
138
|
-
rubygems_version: 3.3.
|
144
|
+
rubygems_version: 3.3.27
|
139
145
|
signing_key:
|
140
146
|
specification_version: 4
|
141
147
|
summary: The JOD theme generates documentation web pages from Ontology turtle documents
|