-
Notifications
You must be signed in to change notification settings - Fork 1
Serving LOD from static files using Quilt's file engine
Mo McRoberts edited this page Nov 23, 2016
·
1 revision
Quilt's file
engine is designed to allow serving a directory tree of Turtle files as Linked Open Data.
To configure Quilt, ensure the following options are set in your quilt.conf
:
[quilt]
engine=file
module=file.so
[file]
;; Replace this with the path to the directory containing
;; your Turtle files
root=/var/www/lod
Quilt will only serve files from the directory that you specify which end in a .ttl
file extension. Other files will be ignored.
The root resource will be loaded from a file named index.ttl
at the root of your tree. The path to all other resources is derived by taking the path portion of the requested URI, prepending the configured root directory, and appending .ttl
.
Given the above configuration:
Request-URI File path
=========== =========
http://example.com/ /var/www/lod/index.ttl
http://example.com/things /var/www/lod/things.ttl
http://example.com/things/circle /var/www/lod/things/circle.ttl
http://example.com/things/circle.nq /var/www/lod/things/circle.ttl
Note in the above example, any extension provided to override content-negotiation for the output format is ignored: the file
module will only load Turtle files.