NCEAS / metacatui

MetacatUI: A client-side web interface for DataONE data repositories
https://nceas.github.io/metacatui
Apache License 2.0
42 stars 28 forks source link

Move JSON-LD schema.org logic into single view + model; truncate or pad descriptions that are too long or too short #2559

Open robyngit opened 1 month ago

robyngit commented 1 month ago

This PR introduces a new SchemaOrgView and SchemaOrg mode, updates views to use these new components, and removes redundant JSON-LD generation code. With management of JSON-LD centralized, added a check for the length of the description in the Dataset json-ld to adhere to Google's guidelines. It either truncates the description if it's above 5000 characters, or adds some text if the description is less than 50 characters.

In working on this, I found a few issues with the current JSON-LD generation that I also fixed in this PR:

Fixes #1899

robyngit commented 1 month ago

The branch is currently deployed at https://metacatui.test.dataone.org/, pointing to the ⚠️ production ⚠️ ADC node