Recipe Scaling — Full Document

scale:
  factor: 2
  unit_categories: [Mass, Volume, Currency, Custom]
convert_to: si

Banana Bread #

An American recipe in cups and ounces. The frontmatter doubles the batch and converts everything to metric — no manual math required. Currency costs scale automatically with the batch size.

Ingredients (1 loaf) #

flour = 1.5 cups → 720 ml
sugar = 0.75 cups → 360 ml
butter = 4 ounces → 227 g
milk = 0.25 cups → 120 ml
bananas = 3 bananas → 6 bananas
eggs = 2 eggs → 4 eggs
baking_soda = 1 teaspoons → 9.86 ml
salt = 0.25 teaspoons → 2.46 ml
vanilla = 1 teaspoons → 9.86 ml

oven = 350 fahrenheit → 177 celsius

Cost #

cost_flour = $0.50 → $1.00
cost_sugar = $0.30 → $0.60
cost_butter = $1.50 → $3.00
cost_milk = $0.25 → $0.50
cost_bananas = $0.75 → $1.50
cost_eggs = $0.60 → $1.20

total_cost = cost_flour + cost_sugar + cost_butter + cost_milk + cost_bananas + cost_eggs → $7.80
per_loaf = total_cost / @scale → $1.95

Scaled batch costs $7.80 total, or $3.90 per loaf. You’ll need 720 ml of flour and 227 g of butter.