ttl2html 2.0.6 → 2.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ttl2html/version.rb +1 -1
- data/lib/ttl2html.rb +7 -1
- data/templates/layout.html.erb +13 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3ce729d5fa24ee0f0bee7469c246866b66be29d929264cdadc0407eeca74d4ee
|
4
|
+
data.tar.gz: 765e30007a06fc04e570ad870eb503dddb0a7eefc119a24df9d6a09e32b65555
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c382e6bdbd98bd83bdcfa658a13b1567102a71fdc52f20c47a64fa7f75b084b47a4754e485e8d3a20276029941822c6f27cacde4782244d51bf44be957e2b93b
|
7
|
+
data.tar.gz: f17d0a336b5e56d73876ef33de8936bc3250ee61dbaf0a940d3b8feb716131c2d5beb16f64c8a0c1fb9cd293db3d054bb36b421bbe07f7f0856ae48b88ed38d7
|
data/lib/ttl2html/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
TTL2HTML::VERSION = "2.0.
|
1
|
+
TTL2HTML::VERSION = "2.0.7"
|
data/lib/ttl2html.rb
CHANGED
@@ -79,7 +79,13 @@ module TTL2HTML
|
|
79
79
|
end
|
80
80
|
result << @data[subject.to_s].keys.sort.map do |predicate|
|
81
81
|
str = "<#{predicate}> "
|
82
|
-
str << @data[subject.to_s][predicate].
|
82
|
+
str << @data[subject.to_s][predicate].sort_by do |object|
|
83
|
+
if /^_:/ =~ object.to_s and @data[object.to_s]
|
84
|
+
format_turtle(object, depth + 1)
|
85
|
+
else
|
86
|
+
object.to_s
|
87
|
+
end
|
88
|
+
end.map do |object|
|
83
89
|
if /^_:/ =~ object.to_s # blank node:
|
84
90
|
format_turtle(object, depth + 1)
|
85
91
|
elsif RDF::URI::IRI =~ object.to_s
|
data/templates/layout.html.erb
CHANGED
@@ -18,13 +18,25 @@
|
|
18
18
|
<meta name="twitter:card" content="summary">
|
19
19
|
<meta name="twitter:title" content="<%=h html_title(param) %>">
|
20
20
|
<meta property="og:title" content="<%=h html_title(param) %>">
|
21
|
+
<%- if param[:ogp] and param[:ogp]["type"] -%>
|
22
|
+
<meta property="og:type" content="<%=h param[:ogp]["type"] %>">
|
23
|
+
<%- else -%>
|
21
24
|
<meta property="og:type" content="website">
|
25
|
+
<%- end -%>
|
22
26
|
<%- if param[:uri] -%>
|
23
27
|
<meta property="og:url" content="<%=h param[:uri] %>">
|
24
28
|
<%- end -%>
|
25
|
-
<%- if param[:
|
29
|
+
<%- if param[:ogp] and param[:ogp]["image"] -%>
|
30
|
+
<meta property="og:image" content="<%=h URI.parse(param[:base_uri]) + param[:ogp]["image"] %>">
|
31
|
+
<%- elsif param[:logo] -%>
|
26
32
|
<meta property="og:image" content="<%=h URI.parse(param[:base_uri]) + param[:logo] %>">
|
27
33
|
<%- end -%>
|
34
|
+
<%- if param[:ogp] -%>
|
35
|
+
<%- param[:ogp].each do |key, value| -%>
|
36
|
+
<%- next if key == "image" or key == "type" -%>
|
37
|
+
<meta property="og:<%=h key %>" content="<%=h value %>">
|
38
|
+
<%- end -%>
|
39
|
+
<%- end -%>
|
28
40
|
<meta name="generator" content="ttl2html <%=h TTL2HTML::VERSION %>">
|
29
41
|
<%- if param[:google_analytics] -%>
|
30
42
|
<script async src="https://www.googletagmanager.com/gtag/js?id=<%=h param[:google_analytics] %>"></script>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ttl2html
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masao Takaku
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-03-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -185,7 +185,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
185
185
|
- !ruby/object:Gem::Version
|
186
186
|
version: '0'
|
187
187
|
requirements: []
|
188
|
-
rubygems_version: 3.
|
188
|
+
rubygems_version: 3.5.3
|
189
189
|
signing_key:
|
190
190
|
specification_version: 4
|
191
191
|
summary: ttl2html
|