This scans all the posts in a Jekyll site for RDFa-encoded data. It gathers all of these into one graph and outputs it as Turtle in posts.ttl
and as JSON-LD in posts.json
.
You can install and use this the way you do with Ruby gems/Jekyll plugins:
gem install jekyll-rdfa
Also see the Jekyll page on Plugins for more information on how to apply this to your site.
By default, this outputs two files: _linked-data/posts.json
and _linked-data/posts.ttl
. You can now set this in the _config.yaml
file for the site:
rdfa:
outputs:
- _rdfa-output/graph.ttl
- _rdfa-output/graph.json
- _rdfa-output/graph.rdf
The value for rdfa.outputs
must be a list. And as this example shows, you can also now opt to output RDF/XML.
jekyll-rdfa
also pays attention to a number of keys in the YAML post frontmatter.
vocab
A default vocabulary URI for the page.
resource
The URI for the topic of the page.
typeof
The URI rdf:type of the topic of the page.
prefix
A YAML hash mapping prefixes to URIs that you will use in the page.
For example, here are some fields from a YAML frontmatter:
vocab: http://bibframe.org/vocab/
resource: http://dbpedia.org/c/8CCRUT
typeof: Person
prefix:
purdom: http://purdom.org/reading#
err: http://www.ericrochester.com/reading#