-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
posts should now merge with normal pages
- Loading branch information
Showing
10 changed files
with
84 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
source 'https://rubygems.org' | ||
group :jekyll_plugins do | ||
gem "theme-gem", :path => '../../theme-gem' | ||
gem 'jekyll-rdf', :path => '../../../' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
baseurl: "" | ||
url: "http://example.org/" | ||
|
||
theme: theme-gem | ||
plugins: | ||
- jekyll-rdf | ||
jekyll_rdf: | ||
path: "_data/knowledge-base.ttl" | ||
restriction: "SELECT ?resourceUri WHERE {?resourceUri ?p ?o}" | ||
default_template: "default" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | ||
@prefix owl: <http://www.w3.org/2002/07/owl#>. | ||
|
||
<http://example.org/blog> a owl:Ontology ; | ||
rdfs:label "My Jekyll RDF Blog" . | ||
|
||
<http://example.org/2019/02/12/Blogpost> a owl:Ontology ; | ||
rdfs:label "My Jekyll RDF Blogpost" . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
PREFIX ex: <http://example.org/> | ||
PREFIX jb: <http://jekyllrdf.biz/> | ||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
rdf_prefix_path: "_data/prefixes.sparql" | ||
--- | ||
<html> | ||
<head> | ||
<title>Rdf Post Merge Test</title> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
</head> | ||
<body> | ||
<h1>My Jekyll RDF Blog</h1><br/> | ||
{{content}}<br/> | ||
{{ page.rdf }}<br/> | ||
</body> | ||
</html> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This is a Blogpost |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
layout: ontology | ||
--- | ||
|
||
A page |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
require 'test_helper' | ||
|
||
class TestPrefixes < Test::Unit::TestCase | ||
context "Page merging feature" do | ||
include RdfTestUtility | ||
should "also merge posts" do | ||
setup_jekyll File.dirname(__FILE__) | ||
|
||
content = [] | ||
file = File.read(File.join(@source, "_site/2019/02/12/Blogpost.html")) | ||
content = file[/\<body\>(.|\s)*\<\/body\>/][6..-6].strip.split("<br/>").map do |entry| | ||
entry.strip | ||
end | ||
|
||
assert_equal "<h1>My Jekyll RDF Blog</h1>", content[0] | ||
assert_equal "This is a Blogpost", content[1] | ||
assert_equal "http://example.org/2019/02/12/Blogpost", content[2] | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters