File tree Expand file tree Collapse file tree 4 files changed +26
-5
lines changed
cases/prefixesInPostsWithGemTheme Expand file tree Collapse file tree 4 files changed +26
-5
lines changed Original file line number Diff line number Diff line change 33
44<http://example.org/blog> a owl:Ontology ;
55 rdfs:label " My Jekyll RDF Blog" .
6+
7+ <http://example.org/2019/02/12/Blogpost> a owl:Ontology ;
8+ rdfs:label " My Jekyll RDF Blogpost" .
Original file line number Diff line number Diff line change @@ -8,14 +8,26 @@ class TestPrefixes < Test::Unit::TestCase
88
99 content = [ ]
1010 file = File . read ( File . join ( @source , "_site/2019/02/12/Blogpost.html" ) )
11- content = file [ /\< body\> (.|\s )*\< \/ body\> / ] [ 6 ..-6 ] . strip . split ( "\n " ) . map do |entry |
11+ content = file [ /\< body\> (.|\s )*\< \/ body\> / ] [ 6 ..-6 ] . strip . split ( "<br/> " ) . map do |entry |
1212 entry . strip
1313 end
1414
15- #TODO This test case has to be completed once jekyll runs successfull
16-
1715 assert_equal "<h1>My Jekyll RDF Blog</h1>" , content [ 0 ]
1816 assert_equal "<p>This is a Blogpost</p>" , content [ 1 ]
17+ # this line has to be uncommented once page.rdf is set in posts
18+ #assert_equal "My Jekyll RDF Blogpost", content[2]
19+ assert_equal "My Jekyll RDF Blog" , content [ 3 ]
20+
21+ content = [ ]
22+ file = File . read ( File . join ( @source , "_site/blog.html" ) )
23+ content = file [ /\< body\> (.|\s )*\< \/ body\> / ] [ 6 ..-6 ] . strip . split ( "<br/>" ) . map do |entry |
24+ entry . strip
25+ end
26+
27+ assert_equal "<h1>My Jekyll RDF Blog</h1>" , content [ 0 ]
28+ assert_equal "A page" , content [ 1 ]
29+ assert_equal "My Jekyll RDF Blog" , content [ 2 ]
30+ assert_equal "My Jekyll RDF Blog" , content [ 3 ]
1931 end
2032 end
2133end
Original file line number Diff line number Diff line change 1+ PREFIX ex: <http://example.org/>
2+ PREFIX jb: <http://jekyllrdf.biz/>
3+ PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
Original file line number Diff line number Diff line change 11---
2+ rdf_prefix_path: "_data/prefixes.sparql"
23---
34< html >
45 < head >
78 < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
89 </ head >
910 < body >
10- < h1 > My Jekyll RDF Blog</ h1 >
11- {{content}}
11+ < h1 > My Jekyll RDF Blog</ h1 > < br />
12+ {{content}}< br />
13+ {{ page.rdf | rdf_property: "rdfs:label" }}< br />
14+ {{ "< http: //example.org/blog> " | rdf_get | rdf_property: "rdfs:label" }}< br />
1215 </ body >
1316</ html >
You can’t perform that action at this time.
0 commit comments