How to leverage structured data
Adding structured data can enable search results that are more engaging to users and might encourage them to interact more with your website
The distribution (as of version 10.3.0) leverages the community contributed Schema.org metatag module and custom code to integrate structured data into many content types. You can test if your page is outputting structured data by using the Schema.org Validator or Google’s Rich Results Test
Once your site is updated, structured data will be automatically generated 🎉 with no additional work from content editors.
Articles have three options for the Type, which map to their appropriate Schema:
- Blog → BlogPosting
- News → NewsArticle
- Press Release → Article (there is currently no other appropriate Schema)
This mapping is set in code (
y_lb_article.module), but all other settings are configurable via the Metatag configuration (
Any time the Branch Hours are updated, that content will also be reflected in the Structured Data that’s read by search engines.
The mapping is configurable in the Metatag configuration (
/admin/config/search/metatag/node__branch). Hours configuration uses the
Open Y Hours_metatag tokens.
If an Accordion section contains Frequently Asked Questions, check the FAQ? checkbox to output them as structured data.
Tips for writing good FAQ content:
- Ensure the content contains individual sets of questions (“How old does my child need to be to swim at the YMCA?”) and answers (“The YMCA offers swim classes starting at age 3 and the pool is open to children of all ages with parental supervision”).
- Only one FAQ should be added to a page. If more than one is added, only the first will be output to the structured data.
Due to the complexity of the FAQ data, the structured data is managed entirely in code and is not customizable via the Drupal admin. If you need specific customizations, please post your ideas in Slack or suggest them on the Roadmap for the core team to discuss and implement.