Find a detailed documentation at https://ttl2html-doc.readthedocs.io/.
Static site generator for Linked Data.
This tool accepts RDF/Turtle format as input to generate the corresponding HTML files.
The Linked Data Principle [TBL:2006] suggests that identifying things as HTTP URIs (resources) and resolving them on the Web is important. This tool helps to generate a website for a Linked Data dataset and publish it on the Web.
Install with gem install ttl2html
- RDF/Turtle to HTML files
- Mapping property labels
- Mapping title properties
- ERB templates based on Bootstrap
- SHACL to documentation for the dataset schema
You can use a command line tool ttl2html
.
You need to create a configuration file named config.yml
with a YAML format, as follows:
One required key for the configuration is base_uri
.
base_uri: https://www.example.org/
With this configuration file, you can execute a command:
ttl2html dataset.ttl
The command parses a dataset file and generate a HTML files.
ttl2html --config test.yml dataset.ttl
The command ttl2html
accepts the following options:
--config file
: Read the configuration file fromfile
(Default:config.yml
).
You can setup several options on the configuration file, config.yml
(default).
base_uri: https://www.example.org/
output_dir: /var/www/html/dataset/
labels:
http://www.w3.org/1999/02/22-rdf-syntax-ns#type: Class
http://schema.org/name: Title
site_title: A sample dataset
title_property: http://example.org/title
top_class: http://schema.org/Book
base_uri
: (Required) Base URI for the dataset. Base URI is considered as the prefix for the target resources, and only the matched URIs with the prefix are picked up for the generation.output_dir
: Output directory for the dataset.labels
: Mappings for the custom property labels.site_title
: Main title for the whole website.title_property
: Specified URI is regarded as a title property for the resource. In default, a title is matched with the following properties:top_class
: Specified URI is the class of the records listed in the top page. By default, this tool does not generate the top page.
A more detailed instructions can be found at https://ttl2html-doc.readthedocs.io/.
🏆 We received the Technology Award at the LOD Challenge Japan 2024
- Linked Open Data Challenge Japan 2024 Organizing Committee. [Press release] Linked Open Data Challenge Japan 2024 Winners Announced. 2024-11-27. (in Japanese)
- Linked Open Data Challenge Japan 2024 Organizing Committee. [Event report] LOD Challenge Japan 2024 Award Ceremony Symposium. 2025-01-11. (in Japanese)
- Yuka Egusa. We received the "Technology Award" at the "LOD Challenge 2024". NIER NEWS. 2025, No.222, p.10. (in Japanese)
There is another tool xlsx2shape
to describe a dataset schema using SHACL. See README-xlsx2shape.md for details.
This tool is based on experiences from publishing Japanese Textbook LOD dataset [JP-TEXTBOOK:2017].
- [TBL:2006] Tim-Berner Lee (2006). "Linked Data". https://www.w3.org/DesignIssues/LinkedData.html
- [JP-TEXTBOOK:2017] Y. Egusa & M. Takaku (2017). "Japanese Textbook LOD". https://w3id.org/jp-textbook/