如何在NewsArticle
或BlogPosting
中嵌套一個或多個配方。schema.org中的多個實體
我試過這個,但Google's Structured Data Testing Tool拋出一個錯誤,抱怨recipe1
鍵。我不知道是什麼改變recipe1
關鍵:
<script type="application/ld+json">
{
"@context" : "http://schema.org",
"@type" : "NewsArticle",
"author" : { "@type" : "Person",
"name" : "hgezim"
},
"dateModified" : "2016-09-21T06:25:35+00:00",
"datePublished" : "2016-09-21T06:25:35+00:00",
"headline" : "Chicken Papriak",
"mainEntityOfPage" : "http://localhost:8080/2016/09/21/chicken-papriak/",
"publisher" : { "@type" : "Organization",
"name" : "Dev Blog"
},
"recipe1": {
"@context": "http://schema.org",
"@type": "Recipe",
"author": "John Smith",
"cookTime": "PT1H",
"datePublished": "2009-05-08",
"description": "This classic banana bread recipe comes from my mom -- the walnuts add a nice texture and flavor to the banana bread.",
"image": "bananabread.jpg",
"recipeIngredient": [
"3 or 4 ripe bananas, smashed",
"1 egg",
"3/4 cup of sugar"
],
"interactionStatistic": {
"@type": "InteractionCounter",
"interactionType": "http://schema.org/Comment",
"userInteractionCount": "140"
},
"name": "Mom's World Famous Banana Bread",
"nutrition": {
"@type": "NutritionInformation",
"calories": "240 calories",
"fatContent": "9 grams fat"
},
"prepTime": "PT15M",
"recipeInstructions": "Preheat the oven to 350 degrees. Mix in the ingredients in a bowl. Add the flour last. Pour the mixture into a loaf pan and bake for one hour.",
"recipeYield": "1 loaf",
"suitableForDiet": "http://schema.org/LowFatDiet"
}
}
</script>
你想表達什麼? 'NewsArticle'內的'BlogPosting'的目的是什麼?報價? 「NewsArticle」內部的「食譜」的目的是什麼?這是文章的主要內容嗎?但是在那種情況下,它真的是一個「新聞文章」嗎? – unor
假設我想要一個'BlogPosting'裏的'Recipe'(或更多)。 – Gezim