p2pu / course-in-a-box

An open-source project for creating online courses, built by P2PU
https://course-in-a-box.p2pu.org/
MIT License
95 stars 492 forks source link

Add support for bioschemas markup of training materials #147

Open pvanheus opened 7 months ago

pvanheus commented 7 months ago

The BioSchemas Training Material profile is an extension of Schema.Org markup to support annotating training material (in the life sciences). This enhances the FAIR-ness of training material by adding machine-readable markup to pages.

It is fairly straightforward to add this markup to Github pages sites. In my experiments adding

{% if page.bioschemas %}
<script type="application/ld+json">
     {{ page.bioschemas | jsonify }}
 </script>  
{% endif %}

to _layouts/course_page.html was enough. Before making a PR, I'd like to hear if this addition is on interested to the broader Course-In-A-Box community.

dirkcuys commented 7 months ago

Hi @pvanheus

Thanks, that would be useful! The proposed code seems pretty close to what would be need for adding any jsonld schema. Can you think of any downside to generalizing the proposed solution?

It would also be useful to add some information about using schemas to the customize section.

pvanheus commented 6 months ago

@dirkcuys yes, you're right this work work for any jsonld schema. So should it simply be changed to: `

{% if page.jsonld %}
<script type="application/ld+json">
     {{ page.jsonld | jsonify }}
 </script>  
{% endif %}

?

Once this is agreed I'll add documentation to the customize section.

dirkcuys commented 6 months ago

Yep, that would be perfect, thanks!