11# static-ldp
22
3- A simple way to expose static HTTP assets as a read-only LDP server.
3+ A simple way to expose static assets as a read-only LDP server.
44
55[ ![ Minimum PHP Version] ( https://img.shields.io/badge/php-%3E%3D%205.6-8892BF.svg?style=flat-square )] ( https://php.net/ )
66[ ![ Build Status] ( https://travis-ci.org/trellis-ldp/static-ldp.svg?branch=master )] ( https://travis-ci.org/trellis-ldp/static-ldp )
@@ -24,4 +24,53 @@ To install `static-ldp`, follow these steps:
2424
25251 . clone this repository into a location on a webserver
26262 . run ` composer install `
27- 3 . copy ` config/settings.yml.sample ` to ` config/settings.yml ` and update any values
27+ 3 . create a ` ./config/settings.yml ` file like this:
28+
29+ sourceDirectory: /path/to/data/directory
30+
31+ ## Configuration
32+
33+ There are many configuration options available. Only the ` sourceDirectory ` _ must_ be defined.
34+ Other options include:
35+
36+ template: default.twig
37+
38+ If you wish to override the HTML template with one of your own design, you can change this
39+ value to point to a different location. Alternately, you can edit the ` default.twig ` file
40+ in the ` templates ` directory. Though if you plan to customize the template, it is recommended
41+ that you use a separate file.
42+
43+ defaultRdfFormat: turtle
44+
45+ For requests without an ` Accept ` header, this is the RDF format used in responses (for
46+ ` ldp:RDFSource ` and ` ldp:BasicContainer ` resources).
47+
48+ contentDisposition: false
49+
50+ For ` ldp:NonRDFSource ` resources, this controls whether to include a ` Content-Disposition `
51+ header in responses.
52+
53+ validRdfFormats:
54+ turtle:
55+ mimeType: text/turtle
56+ extension: ttl
57+ jsonld:
58+ mimeType: application/ld+json
59+ extension: jsonld
60+ ntriples:
61+ mimeType: application/n-triples
62+ extension: nt
63+
64+ Generally speaking, the RDF formats should not be changed unless there is a need to
65+ support a serialization that is not included here. The RDF format (e.g. ` turtle ` ,
66+ ` jsonld ` ) must be an RDF serialization format supported by EasyRdf.
67+
68+ prefixes:
69+ dc: "http://purl.org/dc/terms/"
70+ rdf: "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
71+ ...
72+
73+ The default HTML display template will present IRIs in short (prefixed) form if those
74+ prefixes are registered. By default a number of common prefixes are included, but
75+ any prefix may be registered here.
76+
0 commit comments