I'm using Jekyll with the Jekyll-RDF extension to render some pages for RDF resources. I know how to access the properties of the currently rendered resource in a template. But now I want to access a property of a resource which is linked to the currently rendered resource. So to say I want to make a double hop. But how does that work?
Here is my MWE
The graph:
@prefix ex: <http://example.org/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
ex:nabatz a foaf:Person ;
foaf:nick "Nabatz" ;
foaf:currentProject ex:project .
ex:project a foaf:Project ;
foaf:name "A Project" .
The template:
---
---
<html>
<body>
<h1>{{page.rdf | rdf_property: "<http://xmlns.com/foaf/0.1/nick>"}}</h1>
<dl>
<dt>Current Project</dt>
<dd>{{page.rdf | rdf_property: "<http://xmlns.com/foaf/0.1/currentProject>"}}</dd>
</dl>
</body>
</html>
The output:
<html>
<body>
<h1>Nabatz</h1>
<dl>
<dt>Current Project</dt>
<dd>http://example.org/project</dd>
</dl>
</body>
</html>
What I want:
<html>
<body>
<h1>Nabatz</h1>
<dl>
<dt>Current Project</dt>
<dd>A Project</dd>
</dl>
</body>
</html>