International-Data-Spaces-Association / InformationModel

The Information Model of the International Data Spaces implements the IDS reference architecture as an extensible, machine readable and technology independent data model.
Apache License 2.0
64 stars 37 forks source link

Evaluate github.io content-type behavior #372

Open JohannesLipp opened 3 years ago

JohannesLipp commented 3 years ago

As described in #302 , the response content-type for https://international-data-spaces-association.github.io/InformationModel/docs/serializations/ontology.json is application/json, although application/ld+json is requested. Please verify how that content-type is generated, and if it is possible to alternate that. For example, via a mini experiment with custom file extensions like foo.json, foo.jsonld, foo.bar.

JohannesLipp commented 3 years ago

image

JohannesLipp commented 3 years ago

Same issue for https://international-data-spaces-association.github.io/InformationModel/docs/serializations/ontology.ttl (text/n3 vs text/turtle)

and https://international-data-spaces-association.github.io/InformationModel/docs/serializations/ontology.xml (application/rdf+xml vs application/xml)

JohannesLipp commented 3 years ago

Investigation by @clange : Github.io creates content-types based on file extension. We therefore need the file extensions *.rdf, *.n3, and *.jsonld - and redirects to these.

In other words, we need to copy:

A waste of space, but the easiest way to achieve what we need.

PHochmann commented 2 years ago

See https://docs.github.com/en/pages/getting-started-with-github-pages/about-github-pages#mime-types-on-github-pages: "While you can't specify custom MIME types on a per-file or per-repository basis, you can add or modify MIME types for use on GitHub Pages. For more information, see the mime-db contributing guidelines." For example, https://github.com/jshttp/mime-db/blob/master/db.json lists MIME type ld+json strictly as .jsonld. Maybe add .json?