mirror of
https://github.com/runyanjake/cooking.git
synced 2026-03-26 09:53:17 -07:00
5.4 KiB
5.4 KiB
Recipe Content Structure
This directory contains all recipe content for the cooking website.
Folder Organization
data/recipes/
├── appetizers/
├── mains/
├── desserts/
├── sides/
├── beverages/
└── breads/
Each recipe follows this structure:
category/
└── YYYY.MM.DD-recipe-slug/
├── YYYY.MM.DD-recipe-slug.mdx
└── assets/
├── hero.jpg
├── step1.jpg
└── ...
Recipe Format
MDX File Structure
The .mdx file contains all recipe metadata and content in one place.
Frontmatter (Required)
All recipe metadata is stored in YAML frontmatter at the top of the MDX file:
---
title: "Recipe Title"
slug: "recipe-slug"
date: "YYYY-MM-DD"
lastUpdated: "YYYY-MM-DD"
category: "mains"
tags: ["tag1", "tag2", "tag3"]
dietary: ["vegetarian", "gluten-free"]
cookTime: 45
prepTime: 20
totalTime: 65
difficulty: "easy"
servings: 4
author: "Author Name"
description: "Short description for SEO and previews"
featured: true
display: true
displayPhoto: "./assets/hero.jpg"
---
Frontmatter Fields:
title- Display title of the recipeslug- URL-friendly identifierdate- Publication date (YYYY-MM-DD)lastUpdated- Last modification date (YYYY-MM-DD)category- Main category ID (references../taxonomy.json)tags- Array of tag IDs (references../taxonomy.json)dietary- Array of dietary tag IDs (references../taxonomy.json)cookTime- Active cooking time in minutesprepTime- Preparation time in minutestotalTime- Total time in minutesdifficulty- Difficulty ID: easy, medium, or hard (references../taxonomy.json)servings- Number of servingsauthor- Author ID (references../authors.json)description- Brief description for SEO and cardsfeatured- Boolean for homepage featuringdisplay- Boolean to control visibility (set to false to hide recipe)displayPhoto- Relative path to display photo (e.g., "./assets/hero.jpg")
Note: Use IDs from the reference files (data/authors.json and data/taxonomy.json) to ensure consistency and enable validation.
Content Sections
The following ## (h2) sections are parsed into tabs in the UI:
- ## Photos - Recipe images with captions
- ## Ingredients - Lists of ingredients (can use h3 subsections)
- ## Instructions - Step-by-step cooking instructions
- ## Notes - Tips, variations, storage info (optional)
- ## References - Sources, inspirations, credits (optional)
Example MDX Structure
---
title: "Recipe Name"
slug: "recipe-name"
date: "2026-02-08"
lastUpdated: "2026-02-08"
category: "mains"
tags: ["italian", "chicken"]
dietary: ["gluten-free-option"]
cookTime: 45
prepTime: 20
totalTime: 65
difficulty: "medium"
servings: 4
author: "PWS"
description: "Short description for SEO and previews"
featured: false
display: true
displayPhoto: "./assets/hero.jpg"
---
# Recipe Name
Introduction paragraph about the recipe.
## Photos

*Caption describing the image*

*Another helpful image*
## Ingredients
### For the Main Component
- 2 cups ingredient one
- 1 tablespoon ingredient two
- Salt and pepper to taste
### For the Sauce
- 1 cup sauce base
- Seasonings
## Instructions
### Preparation
1. **Step name**: Detailed instruction with technique.
2. **Another step**: More details here.
### Cooking
3. **Heat and cook**: Continue with numbered steps.
4. **Finish**: Final steps.
## Notes
### Tips for Success
- Helpful tip one
- Helpful tip two
### Storage
- How to store leftovers
- Freezing instructions
### Variations
- How to adapt the recipe
## References
- Source credits
- Inspiration mentions
- Cookbook references
Content Guidelines
Writing Style
- Use clear, conversational language
- Include helpful tips and context
- Explain techniques for beginners
- Add timing and temperature details
Photography
- Include hero shot (main finished dish)
- Add process shots for complex steps
- Use descriptive alt text for accessibility
- Optimize images (web-friendly sizes)
Tags
Choose from these categories:
- Cuisine: italian, mexican, asian, american, mediterranean, etc.
- Protein: chicken, beef, pork, seafood, vegetarian, vegan
- Meal Type: breakfast, lunch, dinner, snack, appetizer
- Occasion: weeknight, holiday, party, comfort-food
- Dietary: gluten-free, dairy-free, low-carb, keto, paleo
- Cooking Method: baking, grilling, slow-cooker, instant-pot
- Speed: quick-meals, one-pot, make-ahead, no-cook
Difficulty Levels
- easy: Beginner-friendly, simple techniques, common ingredients
- medium: Some cooking experience needed, multiple steps
- hard: Advanced techniques, precise timing, specialty equipment
Adding New Recipes
- Create folder:
data/recipes/[category]/YYYY.MM.DD-recipe-name/ - Create
YYYY.MM.DD-recipe-name.mdxwith frontmatter and content - Add images to
assets/folder - Build locally to verify rendering
- Commit and push
Best Practices
- Use consistent date formatting (YYYY.MM.DD)
- Keep slugs URL-friendly (lowercase, hyphens)
- Optimize images before adding (compress, resize)
- Test recipes before publishing
- Include metric and imperial measurements when possible
- Credit sources and inspirations
- Update featured flag sparingly (limit to 3-5 recipes)