Как установить один или несколько рецептов в NewsArticle
или BlogPosting
.Несколько объектов в schema.org
Я пробовал, но Google's Structured Data Testing Tool throws Ошибка при работе с 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>
Что вы хотите передать? Какова была бы цель «BlogPosting» внутри «NewsArticle»? Для цитирования? И какова будет цель 'Рецепт' внутри' NewsArticle'? Это основное содержание статьи? Но в этом случае, действительно ли это «NewsArticle»? – unor
Предположим, я хочу «Рецепт» (или больше) внутри «BlogPosting». – Gezim