defineRecipe(input?: Recipe)
SchemaOrgRecipe
(see how components work)string
title
key, see defaults.string|ImageObject
image
key, see defaults.string[]
Arrayable<HowToStepInput>
Recipe
${canonicalUrl}#recipe
currentRouteMeta.title
(see: route meta resolving)currentRouteMeta.image
(see: route meta resolving)currentRouteMeta.description
(see: route meta resolving)options.defaultLanguage
(see: user Config)currentRouteMeta.datePublished
(see: route meta resolving)See Global Resolves for full context.
datePublished
can be resolved from Date objectsdefineRecipe({ name: 'Peanut Butter Cookies', image: 'https://example.com/photos/1x1/photo.jpg', recipeInstructions: [ { text: 'Bake at 200*C for 40 minutes, or until golden-brown, stirring periodically throughout', }, { text: 'Eat them up', }, ], recipeIngredient: ['Peanut Butter', 'Cookie Dough'],})
export interface RecipeSimple extends Thing { /** * A string describing the recipe. */ name?: string /** * An image representing the completed recipe, referenced by ID. */ image?: NodeRelation<ImageObject | string> /** * An array of strings representing each ingredient and quantity (e.g., "3 apples"). */ recipeIngredient: string[] /** * An array of HowToStep objects. */ recipeInstructions: NodeRelations<HowToStep | string> /** * A string describing the recipe. */ description?: string /** * The cooking time in ISO 8601 format. */ cookTime?: string /** * The time required to prepare the recipe. */ prepTime?: string /** * A NutritionInformation node, with a calories property which defines a calorie count as a string (e.g., "270 calories"). */ nutrition?: NutritionInformation /** * The number of servings the recipe creates (not the number of individual items, if these are different), as a string * (e.g., "6", rather than 6). */ recipeYield?: string /** * An array of strings representing the tools required in the recipe. */ tools?: string[] /** * An array of keywords describing the recipe. */ keywords?: string[] /** * A string describing the cuisine type (e.g., "American" or "Spanish"). */ recipeCuisine?: string /** * The category of the recipe. */ recipeCategory?: 'Appetizer' | 'Breakfast' | 'Brunch' | 'Dessert' | 'Dinner' | 'Drink' | 'Lunch' | 'Main course' | 'Sauce' | 'Side dish' | 'Snack' | 'Starter' /** * A RestrictedDiet node, with a value (or array of values */ suitableForDiet?: Partial<'DiabeticDiet' | 'GlutenFreeDiet' | 'HalalDiet' | 'HinduDiet' | 'KosherDiet' | 'LowCalorieDiet' | 'LowFatDiet' | 'LowLactoseDiet' | 'LowSaltDiet' | 'VeganDiet' | 'VegetarianDiet'>[] /** * A reference to a video representing the recipe instructions, by ID. */ video?: NodeRelations<VideoObject | IdReference> /** * The language code for the guide; e.g., en-GB. */ inLanguage?: string /** * A reference-by-ID to the author of the article. */ author?: NodeRelation<Person> /** * The date when the recipe was added, in ISO 8601 format. */ datePublished?: ResolvableDate}export interface NutritionInformation extends Thing { '@type': 'NutritionInformation' /** * A calorie count as a string (e.g., "270 calories"). */ calories: string}