Skip to content

Create a Mashlib configuration that embeds the Turtle representation into the HTML #24

@RubenVerborgh

Description

@RubenVerborgh

Currently, asking for HTML with the Mashlib configuration will lead to a constant HTML file:

{
"comment": "Serve Databrowser as default representation",
"@id": "urn:solid-server:default:DefaultUiConverter",
"@type": "ConstantConverter",
"contentType": "text/html",
"filePath": "./node_modules/mashlib/dist/databrowser.html",
"options_container": true,
"options_document": true,
"options_minQuality": 1,
"options_disabledMediaRanges": [
"image/*",
"application/pdf"
]
},
{

@timbl has suggested an experiment in which we embed the Turtle representation of a resource into the Mashlib HTML.

Steps:

  1. Create an EJS or Handlebars template where the Mashlib HTML has a placeholder for Turtle
  2. Fill the Turtle placeholder with the incoming stream (which will be Turtle)
  3. Wire up this new template, indicating that it converts text/turtle into text/html

Bonus: for non-RDF resources, keep on serving the static Mashlib HTML.

Original context: https://gitter.im/solid/solidos?at=630e32103a42316d33c864f7

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions