Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Upcoming SlideShare
What to Upload to SlideShare
What to Upload to SlideShare
Loading in …3
×
1 of 25

Jekyll RDF

0

Share

Download to read offline

LSWT2019 Tutorial by Natanael Arndt, Projektleiter @ AKSW/InfAI Management GmbH

Related Books

Free with a 30 day trial from Scribd

See all

Jekyll RDF

  1. 1. Jekyll RDF Natanael Arndt <https://natanael.arndt.xyz/#i> 2019-05-22 #LSWT2019
  2. 2. Introduction
  3. 3. Introduction A Jekyll plugin to include RDF data in your static site or build a complete site for your RDF graph • Creates one page per resource • Assign layouts per RDF class • Standard simple Jekyll layouts • + filters to add resource properties • + filter to query the entire graph Layouts + Graph Static Webpage http://aksw.org/Projects/JekyllRDF 1 / 15
  4. 4. Introduction http://aksw.org/Projects/JekyllRDF 2 / 15
  5. 5. Introduction http://aksw.org/Projects/JekyllRDF 2 / 15
  6. 6. Introduction http://aksw.org/Projects/JekyllRDF 2 / 15
  7. 7. Introduction +RDF HTML Template http://aksw.org/Projects/JekyllRDF 2 / 15
  8. 8. Introduction = Webpage http://aksw.org/Projects/JekyllRDF 2 / 15
  9. 9. Introduction RDF Data Layout TemplatesPages JekyllBuild JekyllRDFJekyll JekyllBuild JekyllRDFJekyll Init Pages Call Plug-In Generators Generate a Page for Each RDF Resource Extract RDF Resource Template Mapping Convert Markdown to HTML Process Jekyll RDF Markup Process Liquid Markup Map Resources IRIs to Page Paths Recursively Apply Layouts to the Page Contents The Layouts can contain further Liquid Tags & Filters as well as Jekyll RDF Markup Write to Disk Jekyll RDF Configuration If a Jekyll Page with the same path as a Jekyll RDF Resource exists already they are merged into one Page Rendered Jekyll Site 1 2 3 Figure 1: The architecture of Jekyll RDF and its interplay with Jekyll. http://aksw.org/Projects/JekyllRDF 3 / 15
  10. 10. Introduction 1 baseurl: "/sachsen/" 2 url: "http://pfarrerbuch.aksw.org" 3 plugins: [jekyll-rdf] 4 jekyll_rdf: 5 path: "sachsen.ttl" 6 restriction: "SELECT ?resourceUri WHERE {?resourceUri ?p ?o . 7 FILTER regex(str(?resourceUri), 8 '^http://pfarrerbuch.aksw.org/sachsen/')}" 9 default_template: "resource" 10 class_template_mappings: 11 "http://xmlns.com/foaf/0.1/Person": "person" 12 "http://purl.org/voc/hp/Place": "place" 13 "http://purl.org/voc/hp/Position": "position" 14 instance_template_mappings: 15 "http://pfarrerbuch.aksw.org/": "home" http://aksw.org/Projects/JekyllRDF 4 / 15
  11. 11. Introduction owl:Thing Resources ClassHierarchy ② ③ ③② ②② ② ②③ Templates x ✓ Figure 2: The class hierarchy is used to select the template to render a resource. 5 / 15
  12. 12. Introduction scheme://authority/path?query#fragment http://pfarrerbuch.aksw.org/sachsen/ort/3441.html http://pfarrerbuch.aksw.org/sachsen/ort/3441#stellen url baseurl Jekyll Site URL http://pfarrerbuch.aksw.org/sachsen/ config file path sub resource res.IRI Jekyll RDF page Figure 3: Scheme of the selection of page paths based on the configured Jekyll Site URL. http://aksw.org/Projects/JekyllRDF 6 / 15
  13. 13. Introduction 1 <h1>{{ page.rdf | rdf_property: "rdfs:label", "en" }}</h1> 2 <div>{{ page.rdf | rdf_property: "dct:created" | date: "%Y-%m-%d" }}</div> 3 4 {% assign publicationlist = "ex:publicationlist" | rdf_container %} 5 <ul> 6 {% for pub in publicationlist %} 7 <li>{{ pub | rdf_property: "dc:title" }}</li> 8 <li>{{ pub | rdf_property: "dct:creator", false, true | join: ", " }}</li> 9 {% endfor %} 10 </ul> http://aksw.org/Projects/JekyllRDF 7 / 15
  14. 14. Introduction Table 1: The filters defined by Jekyll RDF and the tasks performed by them. Filter Parameters ([optional]) Description rdf_get Get a variable representing a resource from the RDF graph. rdf_property IRI, [language, bool] Get a value of a property of a resource. If the last parameter is set to true an array is returned (line 8). rdf_inverse_property IRI, [bool] Get the value of an inverse property. rdf_collection and rdf_container [IRI] Get RDF collections and RDF containers from the RDF graph. sparql_query sparql query Execute a SPARQL Query on the RDF graph, the passed value is bound to ?resourceUri or to ?resourceUri_n if an array is provided. http://aksw.org/Projects/JekyllRDF 8 / 15
  15. 15. Introduction https://github.com/white-gecko/JekyllRDF-Tutorial 9 / 15
  16. 16. Hands On
  17. 17. Hands On https://github.com/white-gecko/JekyllRDF-Tutorial https://natanael.arndt.xyz/2018/08/07/jekyll-rdf-tutorial-screencast https://vimeo.com/283525074 10 / 15
  18. 18. Examples
  19. 19. Examples 11 / 15
  20. 20. Examples 12 / 15
  21. 21. Examples 13 / 15
  22. 22. To Read
  23. 23. To Read Jekyll RDF: Template-Based Linked Data Publication with Minimized Effort and Maximum Scalability Natanael Arndt, Sebastian Zänker, Gezim Sejdiu, Sebastian Tramp in Proceedings of the 19th International Conference on Web Engineering (ICWE 2019), Daejeon, South Korea, 2019-06 https://natanael.arndt.xyz/bib/arndt-n-2019--jekyll-rdf https://doi.org/10.1007/978-3-030-19274-7_24 14 / 15
  24. 24. Contact
  25. 25. Contact Natanael Arndt arndt@infai.org twitter: @white_gecko 15 / 15

×