dataverse icon indicating copy to clipboard operation
dataverse copied to clipboard

Adding DCAT and Schema.org repository description to the Dataverse homepage (#12022)

Open juancorr opened this issue 1 month ago • 5 comments

What this PR does / why we need it:

  • closes #12022

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.

juancorr avatar Dec 05 '25 14:12 juancorr

@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:

  • https://github.com/IQSS/dataverse-pm/issues/425

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

pdurbin avatar Dec 05 '25 15:12 pdurbin

Coverage Status

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

coveralls avatar Dec 05 '25 19:12 coveralls

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

juancorr avatar Dec 05 '25 22:12 juancorr

@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!

pdurbin avatar Dec 09 '25 18:12 pdurbin

Thanks @Philip Durbin @.***> . I'll keep an eye out for any new proposals.

El mar, 9 dic 2025 a las 19:56, Philip Durbin @.***>) escribió:

pdurbin left a comment (IQSS/dataverse#12025) https://github.com/IQSS/dataverse/pull/12025#issuecomment-3633802934

@juancorr https://github.com/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!

— Reply to this email directly, view it on GitHub https://github.com/IQSS/dataverse/pull/12025#issuecomment-3633802934, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACPSCB4MJ5SO2DR6CIDF5D4A4LPDAVCNFSM6AAAAACOFBU4O2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTMMZTHAYDEOJTGQ . You are receiving this because you were mentioned.Message ID: @.***>

juancorr avatar Dec 09 '25 20:12 juancorr