structured data on codebase landing pages + codemeta integration
Each codebase release should have its own specific CodeMeta associated with it. Embed structured json-ld data in the landing page, and provide it in the downloaded archive.
Google's schema.org testing tool (ignore warning about deprecation - https://developers.google.com/search/blog/2020/07/rich-results-test-out-of-beta):
https://search.google.com/structured-data/testing-tool/u/0/
https://search.google.com/test/rich-results
https://codemeta.github.io/user-guide/
List of codemeta terms we should be mapping our metadata onto: https://codemeta.github.io/terms/
https://github.com/proycon/codemetapy
Example codemeta from codemeta: https://github.com/codemeta/codemeta/blob/master/codemeta.json
Example codemeta from ASCL: https://ascl.net/1010.051/codemeta.json
crosswalk in progress at https://docs.google.com/spreadsheets/d/1huJnxvk41AiMRpDwcdSX-Vg_Aw4_GHv1bhUFZyP_Ehs/edit?usp=sharing
The root object is an instance of https://schema.org/SoftwareSourceCode
- [x] add a
targetProductthat is an instance of https://schema.org/SoftwareApplication - [ ] provide additional properties where possible, for example the SoftwareSourceCode
discussionUrlshould point to the related Discourse comments page this would require some hacking since the discourseEmbed is generating that link.. - [ ] add
softwareRequirementsproperties based on captured dependencies (from stencila/dockta?)
discussionUrl can be set by querying the discourse endpoint /embed/info
Example:
curl 'https://meta.discourse.org/embed/info?embed_url=https://blog.discourse.org/2021/04/discourse-team-grows-to-50' -H 'API-KEY: logapikeygoeshere' -H 'API-USERNAME: apiusernamehere'
Response:
{
"topic_id": 187794,
"post_id": 925017,
"topic_slug": "discourse-team-grows-to-50-blog",
"comment_count": 2
}
The embed_url should be the permanent_url for the codebase landing page, and the response we get can be parsed for the topic_id to generate a forum.comses.net/t/<topic_id> link to include as the discussionUrl.
From
https://meta.discourse.org/t/embedding-discourse-comments-via-javascript/31963/394
add dedicated sponsors and funding fields to Codebase metadata as well as emitted codemeta