This wiki page represents the current state of the schema.org support for Drupal 8. Every attempt will be made to keep this document as up to date as possible.
Schema.org is an initiative from the major search engines to standardize a set of types and properties for describing the content in web pages. Google, Bing, Yahoo! and Yandex use this structured data as additional hints to better understand the content and improve the user experience of their products (Rich Snippets are one example). Schema.org launched in June 2011, 6 months after Drupal 7 was released. Work has been going on over the last few months to integrate schema.org in Drupal 8 core. These are the changes which have been committed to Drupal 8 so far:
- The way RDF mappings are stored has been refactored to be more in line with the new Entity API and use the new configuration API (CMI) (#1869600).
- Most of the terms from the vocabularies we used in Drupal 7 (Dublin Core, FOAF, SIOC, SKOS) have been replaced with their equivalent from schema.org (#1784234).
- Datatype callbacks have been made more flexible to address the needs of schema.org (#2020001).
- Allow field formatters to inject RDFa attributes directly in their HTML output, leading to better quality markup for fields like file, image and taxonomy term reference (#1778122).
Below is the new schema that gets installed with the standard profile. Please leave comments below if you have feedback.
Preview schema.org and Drupal 8
What remains to be done
There is more work needed to make schema.org support in Drupal rock. The major limitation at the moment is the lack of support for compound fields which hold more than one value, such as address field (street, locality, zip code, country), fivestar rating (average vote, total votes) or link (URL and title). Some of these are not part of core but we need to have the API in place to support them in contrib to avoid the situation we are currently in in Drupal 7. For that to be possible, the RDF mapping definitions need to be extended to allow for multiple mappings for field (#1778194). Fields are currently limited to one mapping each, which is sufficient for text-like fields and entity reference fields but not sufficient for compound fields.
There is also an issue open to improve the handling of RDF namespaces (#1778410), and more generally we also want to strengthen our markup tests (#2034951) to use the EasyRdf library we've added to core. You can find a more exhaustive list of issues (some of which have already been resolved) in the Fix RDF meta issue) that Lin compiled a few months ago.
How to get involved
If you want to help, join us on IRC in the #drupal-rdf channel, jump in one of the issue linked above, or leave a comment below.
We hold a weekly code sprint every Tue at 4pm EST. Anyone is welcome to join in remotely on IRC: #drupal-rdf.
Funding and credits
Thank you to Acquia and Agaric for sponsoring this work, and to developers Lin Clark, Stéphane Corlosquet, Jesse Day, Kay VanValkenburgh. We also want to thank other members of the community for their reviews and feedback: yched, fago, effulgentsia, Berdir, etc. Work is not complete yet so this will likely grow.