Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New schema - MedicalWebPage #34

Closed
janslu opened this issue Feb 9, 2020 · 10 comments
Closed

New schema - MedicalWebPage #34

janslu opened this issue Feb 9, 2020 · 10 comments
Assignees

Comments

@janslu
Copy link

janslu commented Feb 9, 2020

Have you thought of expanding the available page types with MedicalWebPage?

@janslu
Copy link
Author

janslu commented Feb 20, 2020

For future reference - it's really easy thanks to the Generator.php

The bare minimum needed is
{ "@id": "http://schema.org/MedicalWebPage", "@type": "rdfs:Class", "rdfs:comment": "MedicalWebPage....", "rdfs:label": "MedicalWebPage", "rdfs:subClassOf": { "@id": "http://schema.org/WebPage" } },

in schema.jsonld file.

So if you ever find out you need some additional changes - this is brilliant and works wonderfully. I have also added audience and reviewdBy as traits for WebPages - and it all "just works".

@brotkrueml
Copy link
Owner

Sorry for the late answer, I haven't received a notification about your issue, just saw it today.

The types and properties are generated from the official schema definition (without pending) from recent https://schema.org/version/6.0/schema.jsonld. The schema.jsonld file in this repository is a copy of it for generating the types/properties. So editing this file is not a solution, as on updates on the schema.org vocabulary it is overwritten.

Strangely, MedicalWebPage is not shown as a pending type (pending is blue) on https://schema.org/WebPage#subtypes but is not mentioned in the schema.jsonld.

I opened a ticket on the schemaorg project for clarification: schemaorg/schemaorg#2471

In a future release I want to have the possibility to add own types and properties with a Slot/PSR-14 event. But this means some refactoring before. Then it would be possible to add pending types and also some specific markup like Google uses for the sitelinks searchbox (#24).

@brotkrueml brotkrueml self-assigned this Feb 23, 2020
@janslu
Copy link
Author

janslu commented Feb 23, 2020

Thank you for taking a look. There's a little bit more info here -https://schema.org/docs/meddocs.html It seems that MedicalWebPage is a part of "separate" Medical sub-schema? This is all new for me, so I can only guess. I got the new expectations for markup from an external agency and got puzzled as I also haven't heard about it before. So hats off for making a Generator.php so universal that I only needed few small changes to have it working.

@brotkrueml
Copy link
Owner

Thanks for the link. The clean solution would be a possibility to add own types and enhance existing types with own properties. See: #36. I wanted to refactor the structure for that since some months, I hope I will have the time to do it the next weeks.

@brotkrueml
Copy link
Owner

Thank you for taking a look. There's a little bit more info here -https://schema.org/docs/meddocs.html It seems that MedicalWebPage is a part of "separate" Medical sub-schema?

Yes, you are right. There is an extension for health: https://schema.org/version/latest/ext-health-lifesci.jsonld. So, the best way to go is to give the possibility to add new types/properties. Then the health schema can be provided in a separate TYPO3 extension (and possibly other schema extensions, like bib).

Alternatively, the "all layers" definition file can be used, but this will clutter up the extension, as only a minor group need those schema extensions: https://schema.org/version/latest/all-layers.jsonld

@brotkrueml
Copy link
Owner

See: #38

@brotkrueml
Copy link
Owner

The upcoming version 1.7 will have the possibility to add own types (also web page types like MedicalWebPage). Have a look at: https://docs.typo3.org/p/brotkrueml/schema/master/en-us/Developer/ExtendingVocabulary.html. The feature is already merged into master and also available as alias branch "1.7.x-dev".

@brotkrueml
Copy link
Owner

There is also a TYPO3 Slack channel #ext-schema - you are welcome to join :-)

@brotkrueml
Copy link
Owner

@janslu There is now an extension available which provides the health section of schema.org (with the medical types): https://extensions.typo3.org/extension/schema_health

@janslu
Copy link
Author

janslu commented Apr 8, 2021

just saw! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants