X Enterprises
nuxt-x-affiliate

Recipe

Recipe article with ingredients, instructions, nutrition info, and Recipe schema.org JSON-LD.

Recipe

The XAFRecipe component renders a full recipe article — title, description, prep/cook/total time, servings, ingredients list, instructions list, optional nutrition info, and aggregate rating. Auto-emits a Recipe schema.org JSON-LD payload so Google can show rich recipe results.

Components

<XAFRecipe />

<XAFRecipe
  name="Classic Margherita Pizza"
  description="30-minute homemade pizza with a crispy crust and bright tomato sauce."
  prep-time="PT15M"
  cook-time="PT15M"
  total-time="PT30M"
  recipe-yield="4 servings"
  recipe-category="Main course"
  recipe-cuisine="Italian"
  :keywords="['pizza', 'italian', 'weeknight']"
  :ingredients="[
    { name: 'Pizza dough',   amount: '1 lb' },
    { name: 'San Marzano tomatoes', amount: '1 can' },
    { name: 'Fresh mozzarella',     amount: '8 oz' },
  ]"
  :steps="[
    { name: 'Preheat oven', text: 'Preheat to 500°F with a pizza stone inside for 30 min.' },
    { name: 'Stretch dough', text: 'On a floured surface, stretch to a 12-inch round.' },
    { name: 'Top and bake', text: 'Top with crushed tomatoes, torn mozzarella, and a drizzle of olive oil. Bake 8–10 min.' },
  ]"
  author="Jane Reviewer"
  :rating="{ value: 4.8, count: 124 }"
  :nutrition="{ calories: '285 kcal', proteinContent: '12 g', fatContent: '10 g', carbohydrateContent: '36 g' }"
  image="/img/margherita.jpg"
/>

Props

PropTypeDefaultDescription
namestringrequiredRecipe name.
descriptionstringrequiredShort description.
ingredientsIngredient[]requiredEach: { name, amount? }.
stepsRecipeStep[]requiredEach: { name?, text }.
prepTimestringISO 8601 prep duration (e.g. "PT15M").
cookTimestringISO 8601 cook duration.
totalTimestringISO 8601 total duration.
recipeYieldstringServings / yield.
recipeCategorystringCategory (e.g. "Main course").
recipeCuisinestringCuisine (e.g. "Italian").
keywordsstring[]Comma-joined for schema.
authorstringAuthor name.
rating{ value, count }Aggregate rating for the recipe.
nutritionobjectNutrition info: calories, proteinContent, fatContent, carbohydrateContent.
imagestringHero image URL.

AI Context

component: XAFRecipe
package: "@xenterprises/nuxt-x-affiliate"
use-when: Recipe article with ingredients, instructions, nutrition, and auto-emission of Recipe schema.
Copyright © 2026