User Story
In order to support cleaner searchability and follow web best practices, data.gov admins want JSON-LD for DCAT tags applied to dataset pages in scripts.
Acceptance Criteria
Background
Raised via Linked In, but we did this on the old catalog (handled by CKAN extension dcat: https://github.com/GSA/catalog.data.gov/blob/main/ckan/setup/ckan.ini#L136, and https://github.com/ckan/ckanext-dcat). This will help with semantic web and searchability as bots begin crawling the new site.
Security Considerations (required)
None.
Sketch
Should just be able to drop the whole dataset listing raw into the document in a separate script tag. Might need to apply the "@type": "schema:Dataset" to make sure it complies with web standards, everything else should be good. This will actually be an improvement, the JSON-LD that was exported on the CKAN DCAT extension was bare bones (just name, description, keywords; they didn't even have the distributions mapped properly!).
This could be verified by visiting https://search.google.com/test/rich-results/result?id=h3LXEIIGxYdPLHXqxo-x2g
example:
<script type="application/ld+json" class="jsonld-dataset">
{
"@type": "schema:Dataset",
"name": "Department of Education - 2017-18 Arrests Civil Rights Data Collection",
"description": "This set of Excel file contains data on student referrals to law enforcement by disability and student-related arrests by disability for all states. It also contains data on...",
"keywords": [
"arrests",
"children-with-disabilities",
"civil-rights",
"crdc",
"disability",
"elementary-and-secondary",
"language",
"law-enforcement",
"minority",
"ocr",
"race",
"student-enrollment",
"student-retention",
"students"
],
"publisher": {
"type": "Organization",
"contactPoint": { "type": "PostalAddress" }
},
"distribution": []
}
</script>
User Story
In order to support cleaner searchability and follow web best practices, data.gov admins want JSON-LD for DCAT tags applied to dataset pages in scripts.
Acceptance Criteria
WHEN I go to a catalog dataset page (like https://catalog.data.gov/dataset/nutrition-physical-activity-and-obesity-behavioral-risk-factor-surveillance-system)\
THEN the JSON-LD for DCAT is available in the HTML pages for search bots.
Background
Raised via Linked In, but we did this on the old catalog (handled by CKAN extension dcat: https://github.com/GSA/catalog.data.gov/blob/main/ckan/setup/ckan.ini#L136, and https://github.com/ckan/ckanext-dcat). This will help with semantic web and searchability as bots begin crawling the new site.
Security Considerations (required)
None.
Sketch
Should just be able to drop the whole dataset listing raw into the document in a separate script tag. Might need to apply the "@type": "schema:Dataset" to make sure it complies with web standards, everything else should be good. This will actually be an improvement, the JSON-LD that was exported on the CKAN DCAT extension was bare bones (just name, description, keywords; they didn't even have the distributions mapped properly!).
This could be verified by visiting https://search.google.com/test/rich-results/result?id=h3LXEIIGxYdPLHXqxo-x2g
example: