Dev.to WebDev πŸ›  Dev πŸ‘ 0 πŸ“– 1 min read

How We Structured 70+ Fast-Food Menu Items With Schema.org MenuItem & NutritionInformation

Building a fast, searchable fast-food menu and nutrition reference requires more than plain HTML tables. When designing The Queen Dairy Menu, our goal was to structure 70+ Dairy Queen menu itemsβ€”spanning Blizzards, Grill

Building a fast, searchable fast-food menu and nutrition reference requires more than plain HTML tables. When designing The Queen Dairy Menu, our goal was to structure 70+ Dairy Queen menu itemsβ€”spanning Blizzards, GrillBurgers, Chicken Strip Baskets, cakes, and dipping saucesβ€”so both human visitors and search crawlers get consistent pricing, serving sizes, and calorie data.

1. Static JSON Data Modeling in Astro

Instead of querying a runtime database on every page load, we store each menu item as a typed JSON record inside Astro's build pipeline. Every record tracks:

  • Item metadata: slug, display name, category, and availability notes
  • Size & price variants: Mini, Small, Medium, and Large tiers with unit prices
  • Nutrition metrics: calories, total fat, saturated fat, sodium, carbs, sugars, and protein
  • Allergen flags: dairy, wheat, soy, peanuts, and tree nuts
{
  "slug": "oreo-blizzard",
  "name": "OREO Cookie Blizzard Treat",
  "category": "Blizzard Treats",
  "variants": [
    { "size": "Mini", "calories": 380, "price": 3.49 },
    { "size": "Small", "calories": 580, "price": 4.59 },
    { "size": "Medium", "calories": 760, "price": 5.39 },
    { "size": "Large", "calories": 1000, "price": 5.99 }
  ]
}

At build time, Astro generates zero-JS static HTML routes for every item, keeping Time to First Byte minimal and ensuring predictable Core Web Vitals.

2. Schema.org MenuItem & NutritionInformation JSON-LD

To make size-specific nutrition and pricing machine-readable, each item detail route emits structured JSON-LD combining MenuItem, Offer / AggregateOffer, and NutritionInformation:

{
  "@context": "https://schema.org",
  "@type": "MenuItem",
  "name": "OREO Cookie Blizzard Treat",
  "nutrition": {
    "@type": "NutritionInformation",
    "calories": "380–1000 calories"
  },
  "offers": {
    "@type": "AggregateOffer",
    "priceCurrency": "USD",
    "lowPrice": "3.49",
    "highPrice": "5.99"
  }
}

You can inspect a live example of this data structure on the Oreo Blizzard Nutrition & MenuItem Page.

3. Why Static Structured Data Works for Menu Directories

  • Zero runtime overhead: Pre-rendered Astro pages load immediately without client-side hydration waterfalls.
  • Single source of truth: UI tables, allergen filters, and JSON-LD schema blocks read from the same static JSON dataset, preventing mismatches between visible prices and structured markup.
  • Clean internal linking: Category hubs and item routes connect naturally via shared slugs.
πŸ“° Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.