I am trying to determine how to mark up a Recipe in Schema.org where the recipe has multiple sub-recipes.
For example: A Victoria Sponge might have:
Set #1: Ingredients, preparation steps, and prep/cook times for the Sponge
Set #2: Ingredients, preparation steps, and prep times for the Filling
Set #3: Ingredients, preparation steps, and prep times for the Icing/Topping
I have seen recipe examples where all the ingredients are together in a list and the instructions/steps then attempt to determine which is use at which point, but this is not really satisfactory.
Obvious approaches are: separate recipe components, or perhaps an "array" of ingredients and steps. And, I can see it ought to be possible using a HowTo structure of steps of sub-recipes, but cannot see how.
I'd really like to see an example that has actually been tried. I am using JSON-LD, but anything that demonstrates a principle would be much appreciated!
If you need to group the ingredients per "sub-recipe", you have to provide multiple
Recipeitems, because therecipeIngredientproperty is only defined for theRecipetype.I don’t know if such a model was intended, but it seems to be possible with the specified expected values. It works if you think that a
Recipeinstruction step can be aRecipeitself.JSON-LD example
Example explanation
The main
Recipehas three instruction steps.ListItemis used to give each step aposition(so that theItemListis ordered).The first and the last steps are
HowToStepitems. AHowToStepis a list that can takeHowToDirectionandHowToTipitems as list entries.The second step is a
HowToSectionitem.HowToSectionis a "sub-grouping of steps". Its definition gives this example, which seems to fit your case:Now, instead of representing this
HowToSection’sstepsagain as a list ofHowToStepitems, the sub-recipe is given asRecipeitem. This is possible becausestepshasCreativeWorkas expected value, of whichRecipeis a sub-type.(Note that Google’s SDTT doesn’t recognize the
HowTotypes yet. They were introduced with the current Schema.org version 3.3, which was released last month.)