Generate Schema.org JSON-LD for Certificate Page
Source:R/utils_build_metadata.R
generate_cert_schema_org.RdCreates Schema.org JSON-LD metadata representing a CODECHECK certificate as a Review of a ScholarlyArticle. The structure follows schema.org best practices with the certificate (Review) as the main entity and the paper (ScholarlyArticle) nested as the itemReviewed.
Usage
generate_cert_schema_org(
cert_id,
config_yml,
abstract_data = NULL,
openalex_id = NULL,
cert_title = NULL
)Arguments
- cert_id
Certificate ID (e.g., "2025-028")
- config_yml
Parsed codecheck.yml configuration
- abstract_data
Abstract data from get_abstract() with text and source fields
- openalex_id
Optional pre-resolved OpenAlex ID (see
resolve_external_field). `NULL` means "not looked up here" and omits the field, matching the pre-existing behaviour of this function for callers that don't pass one.- cert_title
Title of the certificate's record on the platform it is published on, see
resolve_cert_title; falls back to the constructed "CODECHECK Certificate <ID>" when not given