jekyll-rdfa 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -7
- data/lib/jekyll-rdfa.rb +18 -5
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d0d05a37afcc4420b30f4a14fc82e2b340a817f0
|
4
|
+
data.tar.gz: 23fa12f31651618c59878e1bfbc88ed48a329019
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 70e1f6635e4ff28aba01be08462c1cb274b3722b4d5dde8462ae72bb3ae1377325c248ffb3a210df3940e15dee0f770278adbd32a5cda980c26227ae4d8663ca
|
7
|
+
data.tar.gz: 8752cd23ca89af7143ccaafffecf1e545732fa909664f24ecd829ef06c9b1d66963900ba3e59f9ccaaec721b7e9757c00ae28488af1d7487c2469725bd4d9acf
|
data/README.md
CHANGED
@@ -45,10 +45,10 @@ prefix:
|
|
45
45
|
err: http://www.ericrochester.com/reading#
|
46
46
|
```
|
47
47
|
|
48
|
-
rdfa: http://rdfa.info/ RDFa
|
49
|
-
ttl: http://www.w3.org/TR/turtle/ Turtle
|
50
|
-
json-ld: http://json-ld.org/ JSON-LD
|
51
|
-
plugins: https://jekyllrb.com/docs/plugins/
|
52
|
-
frontmatter: http://jekyllrb.com/docs/frontmatter/
|
53
|
-
yaml: http://yaml.org/
|
54
|
-
rdf_type: http://www.w3.org/TR/rdf-schema/#ch_type
|
48
|
+
[rdfa]: http://rdfa.info/ "RDFa"
|
49
|
+
[ttl]: http://www.w3.org/TR/turtle/ "Turtle"
|
50
|
+
[json-ld]: http://json-ld.org/ "JSON-LD"
|
51
|
+
[plugins]: https://jekyllrb.com/docs/plugins/
|
52
|
+
[frontmatter]: http://jekyllrb.com/docs/frontmatter/
|
53
|
+
[yaml]: http://yaml.org/
|
54
|
+
[rdf_type]: http://www.w3.org/TR/rdf-schema/#ch_type
|
data/lib/jekyll-rdfa.rb
CHANGED
@@ -22,10 +22,20 @@ module Jekyll
|
|
22
22
|
|
23
23
|
attribs = {}
|
24
24
|
attribs[:vocab] = post.data["vocab"] if post.data.member? "vocab"
|
25
|
+
|
26
|
+
needs_typeof = false
|
25
27
|
if post.data.member? "resource"
|
26
28
|
attribs[:resource] = post.data["resource"]
|
27
|
-
|
29
|
+
needs_typeof = true
|
30
|
+
end
|
31
|
+
if post.data.member? "about"
|
32
|
+
attribs[:about] = post.data["about"]
|
33
|
+
needs_typeof = true
|
34
|
+
end
|
35
|
+
if post.data.member? "typeof" and needs_typeof
|
36
|
+
attribs[:typeof] = post.data["typeof"]
|
28
37
|
end
|
38
|
+
|
29
39
|
if post.data.member? "prefix"
|
30
40
|
prefixes = post.data["prefix"]
|
31
41
|
.to_a.map { |key, value| "#{key}: #{value}" }
|
@@ -40,10 +50,13 @@ module Jekyll
|
|
40
50
|
.join ""
|
41
51
|
html = "<div#{markup}>#{html}</div>"
|
42
52
|
end
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
53
|
+
count = 0
|
54
|
+
RDF::Reader.for(:rdfa).new(html) do |reader|
|
55
|
+
reader.each_statement do |statement|
|
56
|
+
graph << statement
|
57
|
+
count += 1
|
58
|
+
end
|
59
|
+
end
|
47
60
|
end
|
48
61
|
|
49
62
|
dirname = "_linked-data"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-rdfa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Rochester
|
@@ -12,7 +12,7 @@ cert_chain: []
|
|
12
12
|
date: 2015-10-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
|
-
name: json
|
15
|
+
name: json-ld
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
18
|
- - "~>"
|
@@ -40,7 +40,7 @@ dependencies:
|
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: '1.1'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
|
-
name: rdf
|
43
|
+
name: rdf-turle
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
46
|
- - "~>"
|
@@ -54,7 +54,7 @@ dependencies:
|
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: '1.1'
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
|
-
name: rdf
|
57
|
+
name: rdf-rdfa
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
60
|
- - "~>"
|
@@ -113,7 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
113
113
|
version: '0'
|
114
114
|
requirements: []
|
115
115
|
rubyforge_project:
|
116
|
-
rubygems_version: 2.4.
|
116
|
+
rubygems_version: 2.4.5.1
|
117
117
|
signing_key:
|
118
118
|
specification_version: 4
|
119
119
|
summary: A Jekyll generator for RDFa.
|