Last active
April 26, 2019 18:20
-
-
Save patrickcoombe/48d4ad1eca1b22f6c5ae to your computer and use it in GitHub Desktop.
Recipe
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script type="application/ld+json"> | |
| //Code borrowed from Google's AMP project Github | |
| // The document referenced in mainEntityOfPage should be the same as the | |
| // canonical link above. | |
| // | |
| // Also, please be aware that some platforms that use AMP HTML have | |
| // further restrictions with regards to some schema components. | |
| // | |
| // For example: | |
| // | |
| // * The leader "image" referenced in the markup below must appear | |
| // somewhere on the AMP HTML document itself. | |
| // | |
| // * The URL for that "image" must precisely match the src of the | |
| // amp-img tag. | |
| // | |
| // * All marked-up URLs should be absolute. | |
| // | |
| // * The "logo" dimensions must not exceed 600x60. | |
| { | |
| "@context": "https://schema.org/", | |
| "@type": "Recipe", | |
| "mainEntityOfPage": "http://example.ampproject.org/recipe-metadata.html", | |
| "name": "Grandma's Holiday Apple Pie", | |
| "image": { | |
| "@type": "ImageObject", | |
| "url": "http://cdn.ampproject.org/leader.jpg", | |
| "height": 200, | |
| "width": 200 | |
| }, | |
| "author": { | |
| "@type":"Person", | |
| "name":"Carol Smith" | |
| }, | |
| "datePublished": "2009-11-05", | |
| "description": "This is my grandmother's apple pie recipe. I like to add a dash of nutmeg.", | |
| "aggregateRating": { | |
| "@type": "AggregateRating", | |
| "ratingValue": "4.0", | |
| "reviewCount": "35" | |
| }, | |
| "prepTime": "PT30M", | |
| "cookTime": "PT1H", | |
| "totalTime": "PT1H30M", | |
| "recipeYield": "1 9\" pie (8 servings)", | |
| "nutrition": { | |
| "@type": "NutritionInformation", | |
| "servingSize": "1 medium slice", | |
| "calories": "250 cal", | |
| "fatContent": "12 g" | |
| }, | |
| "ingredients": [ | |
| "apples", | |
| "White sugar" | |
| ], | |
| "recipeInstructions": "1. Cut and peel apples\n 2. Mix sugar and cinnamon. Use additional sugar for tart apples.\n...", | |
| "publisher": { | |
| "@type": "Organization", | |
| "name": "Google", | |
| "logo": { | |
| "@type": "ImageObject", | |
| "url": "http://cdn.ampproject.org/logo.jpg", | |
| "width": 600, | |
| "height": 60 | |
| } | |
| } | |
| } | |
| </script> |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
enjoy!