Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Thanks for this great module! However Google does not show rich snippets because this module uses the old data-vocabulary.org namespace. I managed to have Google show Rich Snippets for recipes powered by this module by updating its namespace to schema instead of data-vocabulary. Here is a live search results in Google's Recipe:
You can also view some examples in the Rich Snippet testing tool: apple pie, Lemon-Coconut Squares.
Note that the image field is not part of the recipe module, but it is easy to add it manually following the instructions of the schema.org documentation on recipe.
Comment | File | Size | Author |
---|---|---|---|
#7 | 1515184_7_recipe_rdf_update.patch | 425 bytes | scor |
#6 | 1515184_6_recipe_rdf_update.patch | 447 bytes | scor |
#1 | 1515184_1_recipe_schema.patch | 2.37 KB | scor |
recipe-live-rich-snippet.png | 41.99 KB | scor |
Comments
Comment #1
scor CreditAttribution: scor commentedI've been running this patch on schema.openspring.net for several weeks now and once indexed by Google, it only took a few days for the Rich Snippet to show up in the live search results.
Comment #2
dcam CreditAttribution: dcam commentedI applied the patch successfully. All the changes were applied correctly. I encountered a problem while testing it. The changes made in recipe_rdf_mapping() weren't showing up in the page, although the changes in theme_recipe_ingredients() did. I flushed all caches, but that didn't fix things. I uninstalled and re-enabled RDF and then all the patch's changes were working. I've never worked with RDF before, so if there's an easier way to get the changes to show up I don't know what it is yet.
Like I said, I'm not familiar with RDF, but this seems like a pretty good idea to me. Thanks for working on this, scor.
Comment #3
scor CreditAttribution: scor commented@dcam thanks for testing. you're right. I only tested by applying this patch and installing Drupal. I'll write an update function to apply the new mappings. expect a patch in the new few mins.
Comment #4
jvandervort CreditAttribution: jvandervort commentedCommitted to dev. Thanks for the help.
Comment #5
scor CreditAttribution: scor commented@jvandervort: great! I'll follow up with another patch with the update function then.
Comment #6
scor CreditAttribution: scor commentedhere is the patch with the update function.
Comment #7
scor CreditAttribution: scor commentedsame patch with slightly better comments.
Comment #8
dcam CreditAttribution: dcam commented#7 works for me. The new schema showed up right away this time.
Comment #9
jvandervort CreditAttribution: jvandervort commentedCommitted, thanks.