Skip to content

Conversation

@juancorr
Copy link
Contributor

@juancorr juancorr commented Dec 5, 2025

What this PR does / why we need it:

This PR is created to add Schema.org and DCAT information in JSON-LD format to the repository homepage in order to improve the visibility and trustworthiness of the repository. This could include:

Special notes for your reviewer:
It is a possible solution, obtaining the data from the setting table in the database. The json-ld data will be created into the html code:

[...]<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="description" content="Repositorio de Datos del Consorcio Madroño" />
<link rel="api-catalog" type="application/linkset+json" href="[http://bib6162invi6106:8080/resources/json/.well-known/api-catalog](view-source:http://bib6162invi6106:8080/resources/json/.well-known/api-catalog)" />
<script rel="describedby" type="application/ld+json">
{"@context":{"dcat":"http://www.w3.org/ns/dcat#","dct":"http://purl.org/dc/terms/","foaf":"http://xmlns.com/foaf/0.1/","rdf":"http://www.w3.org/1999/02/22-rdf-syntax-ns#"," ...................
</script><link type="text/css" rel="stylesheet" href="[/jakarta.faces.resource/ ............................
<link rel="apple-touch-icon" sizes="180x180" .............
[...]

Suggestions on how to test this:
Check the homepage to see that the json-ld code is into the html. It shouldn't be into other dataset or dataverse pages.

Additional documentation:
If this PR is approved, Dataverse api guide should be update too.

@pdurbin
Copy link
Member

pdurbin commented Dec 5, 2025

@juancorr thanks for the pull request! I added the "trusted data" label to this PR because it feels related to our work in that project, which is being tracked here:

To make this more concrete, Harvard Dataverse, for example doesn't programmatically expose any machine-readable information about its trustworthiness, etc. when you point a tool at its homepage. It looks this:

Screenshot 2025-12-05 at 10 10 27 AM

With this PR we can expose lots of machine-readable information like this:

Screenshot 2025-12-05 at 10 10 48 AM

I'm highlighting CoreTrustSeal above but there is all kinds of good stuff in there about what standards are supported and what APIs are available. For a complete list, see https://validator.schema.org/#url=https%3A%2F%2Fedatos.consorciomadrono.es%2F

@coveralls
Copy link

coveralls commented Dec 5, 2025

Coverage Status

coverage: 24.069% (-0.1%) from 24.168%
when pulling 4986714 on Consorcio-Madrono:jsonInfoInHomePage
into d2b6a46 on IQSS:develop.

@juancorr
Copy link
Contributor Author

juancorr commented Dec 5, 2025

Thanks @pdurbin for give context to the PR.
We can also inspect the dcat json metadata with the Google Rich Result test: https://search.google.com/test/rich-results
image

image

The code of this PR extract some information from the current Dataverse installation and settings database table, and allows adding extra information in the setting database using new fields:
:dcat_repository_country,
:dcat_repository_language,
:dcat_repository_research_area,
:dcat_repository_prev_policy,
:dcat_repository_terms,
:dcat_repository_license,
:dcat_repository_certification,
:dcat_repository_org_name,
:dcat_repository_access_terms,
:dcat_repositoryDescription

@scolapasta scolapasta assigned scolapasta and pdurbin and unassigned scolapasta Dec 9, 2025
@scolapasta scolapasta moved this from Ready for Triage to On Hold ⌛ in IQSS Dataverse Project Dec 9, 2025
@pdurbin
Copy link
Member

pdurbin commented Dec 9, 2025

@juancorr we discussed this during our Trusted Data project meeting on Monday and during "Triage Tuesday" today. We gave it a status of "On Hold" because we don't plan to actively review and QA your solution until we've had time to consider other solutions as well. Thanks again for the PR!

@juancorr
Copy link
Contributor Author

juancorr commented Dec 9, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: On Hold ⌛

Development

Successfully merging this pull request may close these issues.

Feature Request: Add Schema.org and DCAT information in JSON-LD format to the repository homepage

4 participants