mirror of
https://github.com/runyanjake/cooking.git
synced 2026-03-26 01:43:17 -07:00
Update recipes
This commit is contained in:
parent
8545112d56
commit
bc013860b0
@ -1,4 +1,5 @@
|
||||
import Link from 'next/link';
|
||||
import Image from 'next/image';
|
||||
import type { RecipeMetadata } from '@/lib/recipes';
|
||||
|
||||
interface RecipeCardProps {
|
||||
@ -6,13 +7,27 @@ interface RecipeCardProps {
|
||||
}
|
||||
|
||||
export default function RecipeCard({ recipe }: RecipeCardProps) {
|
||||
const imageRelativePath = recipe.displayPhoto.startsWith('./')
|
||||
? `${recipe.folderPath}/${recipe.displayPhoto.replace('./', '')}`
|
||||
: recipe.displayPhoto;
|
||||
|
||||
const normalizedPath = imageRelativePath.replace(/\\/g, '/');
|
||||
const imageSrc = `/api/recipe-image?path=${encodeURIComponent(normalizedPath)}`;
|
||||
|
||||
return (
|
||||
<Link
|
||||
href={`/recipes/${recipe.category}/${recipe.slug}`}
|
||||
className="group block bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden hover:shadow-lg transition-shadow"
|
||||
>
|
||||
<div className="aspect-video bg-gray-200 dark:bg-gray-700 flex items-center justify-center text-4xl">
|
||||
📷
|
||||
<div className="aspect-video bg-gray-200 dark:bg-gray-700 relative overflow-hidden">
|
||||
<Image
|
||||
src={imageSrc}
|
||||
alt={recipe.title}
|
||||
fill
|
||||
className="object-cover"
|
||||
sizes="(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw"
|
||||
unoptimized
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="p-4 space-y-2">
|
||||
|
||||
@ -52,6 +52,8 @@ servings: 4
|
||||
author: "Author Name"
|
||||
description: "Short description for SEO and previews"
|
||||
featured: true
|
||||
display: true
|
||||
displayPhoto: "./assets/hero.jpg"
|
||||
---
|
||||
```
|
||||
|
||||
@ -71,6 +73,8 @@ featured: true
|
||||
- `author` - Author ID (references `../authors.json`)
|
||||
- `description` - Brief description for SEO and cards
|
||||
- `featured` - Boolean for homepage featuring
|
||||
- `display` - 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.
|
||||
|
||||
@ -103,6 +107,8 @@ servings: 4
|
||||
author: "PWS"
|
||||
description: "Short description for SEO and previews"
|
||||
featured: false
|
||||
display: true
|
||||
displayPhoto: "./assets/hero.jpg"
|
||||
---
|
||||
|
||||
# Recipe Name
|
||||
|
||||
@ -1,114 +0,0 @@
|
||||
---
|
||||
title: "Perfect Chocolate Chip Cookies"
|
||||
slug: "chocolate-chip-cookies"
|
||||
date: "2026-02-08"
|
||||
lastUpdated: "2026-02-08"
|
||||
category: "desserts"
|
||||
tags: ["cookies", "chocolate", "baking", "dessert", "american"]
|
||||
dietary: ["vegetarian"]
|
||||
cookTime: 12
|
||||
prepTime: 15
|
||||
totalTime: 27
|
||||
difficulty: "easy"
|
||||
servings: 24
|
||||
author: "pws"
|
||||
description: "Classic chewy chocolate chip cookies with crispy edges and gooey centers, loaded with chocolate chips."
|
||||
featured: true
|
||||
---
|
||||
|
||||
# Perfect Chocolate Chip Cookies
|
||||
|
||||
The ultimate chocolate chip cookie recipe that delivers crispy edges, chewy centers, and loads of melty chocolate chips in every bite. This recipe has been tested and perfected to create bakery-style cookies at home.
|
||||
|
||||
## Photos
|
||||
|
||||

|
||||
*A stack of golden-brown cookies showing the perfect texture*
|
||||
|
||||

|
||||
*Gooey chocolate chips and perfect chewy texture*
|
||||
|
||||

|
||||
*Fresh from the oven with melted chocolate*
|
||||
|
||||

|
||||
*The perfect cookie and milk pairing*
|
||||
|
||||
## Ingredients
|
||||
|
||||
### Dry Ingredients
|
||||
- 2 1/4 cups (280g) all-purpose flour
|
||||
- 1 teaspoon baking soda
|
||||
- 1 teaspoon fine sea salt
|
||||
|
||||
### Wet Ingredients
|
||||
- 1 cup (2 sticks / 226g) unsalted butter, softened to room temperature
|
||||
- 3/4 cup (150g) granulated sugar
|
||||
- 3/4 cup (165g) packed light brown sugar
|
||||
- 2 large eggs, room temperature
|
||||
- 2 teaspoons pure vanilla extract
|
||||
|
||||
### Mix-ins
|
||||
- 2 cups (340g) semi-sweet chocolate chips
|
||||
- 1 cup (170g) milk chocolate chips (optional, for extra chocolate)
|
||||
- Flaky sea salt for topping (optional)
|
||||
|
||||
## Instructions
|
||||
|
||||
### Prepare
|
||||
1. **Preheat oven**: Set to 375°F (190°C). Line two baking sheets with parchment paper.
|
||||
2. **Combine dry ingredients**: In a medium bowl, whisk together flour, baking soda, and salt. Set aside.
|
||||
|
||||
### Make the Dough
|
||||
3. **Cream butter and sugars**: In a large bowl or stand mixer, beat softened butter with both sugars on medium speed for 2-3 minutes until light and fluffy.
|
||||
4. **Add eggs and vanilla**: Beat in eggs one at a time, then add vanilla extract. Mix until well combined, scraping down the sides of the bowl.
|
||||
5. **Add dry ingredients**: With mixer on low speed, gradually add the flour mixture. Mix just until no flour streaks remain (don't overmix).
|
||||
6. **Fold in chocolate**: Use a spatula or wooden spoon to fold in chocolate chips until evenly distributed.
|
||||
|
||||
### Chill (Important!)
|
||||
7. **Chill the dough**: Cover bowl with plastic wrap and refrigerate for at least 30 minutes (or up to 72 hours for even better flavor). Cold dough = thicker cookies!
|
||||
|
||||
### Bake
|
||||
8. **Scoop dough**: Use a cookie scoop or tablespoon to form balls (about 2 tablespoons each). Place 2 inches apart on prepared baking sheets.
|
||||
9. **Add salt**: If using, sprinkle a tiny pinch of flaky sea salt on top of each dough ball.
|
||||
10. **Bake**: Bake for 10-12 minutes until edges are golden brown but centers still look slightly underdone.
|
||||
11. **Cool**: Let cookies cool on the baking sheet for 5 minutes (they'll continue to set), then transfer to a wire rack.
|
||||
|
||||
### Serve
|
||||
12. **Enjoy**: Serve warm or at room temperature. Best enjoyed with cold milk!
|
||||
|
||||
## Notes
|
||||
|
||||
### Tips for Success
|
||||
- **Room temperature ingredients**: Softened butter and eggs create the best texture
|
||||
- **Don't skip chilling**: Cold dough prevents spreading and creates thicker cookies
|
||||
- **Underbake slightly**: Cookies will look underdone but will set as they cool
|
||||
- **Use parchment paper**: Prevents sticking and promotes even browning
|
||||
- **Measure flour correctly**: Spoon and level flour, don't pack it
|
||||
|
||||
### Storage & Freezing
|
||||
- **Room temperature**: Store in an airtight container for up to 5 days
|
||||
- **Refresh**: Warm in a 300°F oven for 3-4 minutes to restore chewiness
|
||||
- **Freeze dough**: Scoop dough balls and freeze for up to 3 months. Bake from frozen, adding 1-2 minutes
|
||||
- **Freeze baked cookies**: Freeze baked cookies for up to 2 months
|
||||
|
||||
### Variations
|
||||
- **Brown butter cookies**: Brown the butter for a nutty, caramel flavor
|
||||
- **Thick and bakery-style**: Increase flour to 2 1/2 cups and chill overnight
|
||||
- **Double chocolate**: Add 1/4 cup cocoa powder to dry ingredients
|
||||
- **Mix-ins**: Try nuts, toffee bits, or different chocolate varieties
|
||||
- **Giant cookies**: Use 1/4 cup dough per cookie, bake 14-16 minutes
|
||||
|
||||
### Science Behind the Recipe
|
||||
- **Brown sugar**: Creates chewiness and moisture
|
||||
- **Granulated sugar**: Creates crispy edges
|
||||
- **Baking soda**: Promotes spreading and browning
|
||||
- **Chilling**: Allows flour to hydrate and flavors to develop
|
||||
- **Underbaking**: Keeps centers soft and gooey
|
||||
|
||||
## References
|
||||
|
||||
- Based on the classic Nestlé Toll House recipe
|
||||
- Chilling technique from *The Food Lab* by J. Kenji López-Alt
|
||||
- Brown butter variation inspired by *BraveTart* by Stella Parks
|
||||
- Tested with feedback from family and friends over multiple batches
|
||||
@ -1,6 +0,0 @@
|
||||
# Assets folder for chocolate chip cookies
|
||||
# Add images here:
|
||||
# - stack.jpg
|
||||
# - cross-section.jpg
|
||||
# - cooling-rack.jpg
|
||||
# - hero.jpg
|
||||
@ -1,99 +0,0 @@
|
||||
---
|
||||
title: "Classic Chicken Parmesan"
|
||||
slug: "chicken-parmesan"
|
||||
date: "2026-02-05"
|
||||
lastUpdated: "2026-02-05"
|
||||
category: "mains"
|
||||
tags: ["italian", "chicken", "comfort-food", "family-friendly"]
|
||||
dietary: ["gluten-free-option"]
|
||||
cookTime: 45
|
||||
prepTime: 20
|
||||
totalTime: 65
|
||||
difficulty: "medium"
|
||||
servings: 4
|
||||
author: "pws"
|
||||
description: "A classic Italian-American dish featuring crispy breaded chicken topped with marinara sauce and melted cheese."
|
||||
featured: true
|
||||
---
|
||||
|
||||
# Classic Chicken Parmesan
|
||||
|
||||
A beloved Italian-American comfort food that combines crispy breaded chicken cutlets with rich marinara sauce and gooey melted cheese. Perfect for a family dinner or special occasion.
|
||||
|
||||
## Photos
|
||||
|
||||

|
||||
*Golden-brown chicken topped with bubbling cheese*
|
||||
|
||||

|
||||
*Perfectly crispy coating with melted mozzarella*
|
||||
|
||||

|
||||
*Served alongside spaghetti with fresh basil*
|
||||
|
||||
## Ingredients
|
||||
|
||||
### For the Chicken
|
||||
- 4 boneless, skinless chicken breasts (about 6-8 oz each)
|
||||
- 1 cup all-purpose flour
|
||||
- 2 large eggs, beaten
|
||||
- 2 cups Italian-style breadcrumbs
|
||||
- 1 cup grated Parmesan cheese (divided)
|
||||
- 1 teaspoon garlic powder
|
||||
- 1 teaspoon dried oregano
|
||||
- Salt and freshly ground black pepper to taste
|
||||
- 1/2 cup olive oil (for frying)
|
||||
|
||||
### For the Sauce & Topping
|
||||
- 2 cups marinara sauce (homemade or quality store-bought)
|
||||
- 1 1/2 cups shredded mozzarella cheese
|
||||
- 1/4 cup fresh basil leaves, torn
|
||||
- Extra Parmesan for serving
|
||||
|
||||
## Instructions
|
||||
|
||||
### Prep the Chicken
|
||||
1. **Pound the chicken**: Place chicken breasts between two sheets of plastic wrap and pound to an even 1/2-inch thickness using a meat mallet.
|
||||
2. **Season**: Season both sides generously with salt and pepper.
|
||||
|
||||
### Set Up Breading Station
|
||||
3. **Prepare three shallow dishes**:
|
||||
- Dish 1: All-purpose flour
|
||||
- Dish 2: Beaten eggs with 1 tablespoon water
|
||||
- Dish 3: Breadcrumbs mixed with 1/2 cup Parmesan, garlic powder, and oregano
|
||||
|
||||
### Bread and Fry
|
||||
4. **Coat the chicken**: Dredge each breast in flour (shake off excess), dip in egg mixture, then press firmly into breadcrumb mixture, coating both sides thoroughly.
|
||||
5. **Heat oil**: In a large skillet, heat olive oil over medium-high heat until shimmering.
|
||||
6. **Fry**: Cook chicken for 4-5 minutes per side until golden brown and cooked through (internal temp 165°F). Work in batches if needed. Transfer to a paper towel-lined plate.
|
||||
|
||||
### Assemble and Bake
|
||||
7. **Preheat oven**: Set to 400°F (200°C) or turn on broiler.
|
||||
8. **Assemble**: Place fried chicken in a baking dish. Spoon marinara sauce over each piece, then top with mozzarella and remaining Parmesan.
|
||||
9. **Bake**: Bake for 10-12 minutes (or broil for 3-4 minutes) until cheese is melted and bubbly.
|
||||
10. **Garnish and serve**: Top with fresh torn basil and serve immediately with pasta or a side salad.
|
||||
|
||||
## Notes
|
||||
|
||||
### Tips for Success
|
||||
- **Even thickness**: Pounding the chicken ensures even cooking
|
||||
- **Don't overcrowd**: Fry in batches to maintain oil temperature
|
||||
- **Quality ingredients**: Use good marinara sauce for best flavor
|
||||
- **Make ahead**: Bread chicken up to 4 hours ahead and refrigerate
|
||||
- **Gluten-free option**: Substitute with gluten-free flour and breadcrumbs
|
||||
|
||||
### Storage
|
||||
- **Refrigerate**: Store leftovers in an airtight container for up to 3 days
|
||||
- **Reheat**: Warm in a 350°F oven for 15-20 minutes to maintain crispiness
|
||||
- **Freeze**: Freeze breaded (uncooked) chicken for up to 2 months
|
||||
|
||||
### Variations
|
||||
- **Baked version**: Skip frying and bake breaded chicken at 425°F for 20-25 minutes
|
||||
- **Spicy**: Add red pepper flakes to the breadcrumb mixture
|
||||
- **Extra crispy**: Use panko breadcrumbs instead of Italian breadcrumbs
|
||||
|
||||
## References
|
||||
|
||||
- Adapted from traditional Italian-American recipes
|
||||
- Inspired by *The Silver Spoon* Italian cookbook
|
||||
- Breading technique from classic French *cotoletta* method
|
||||
@ -1,5 +0,0 @@
|
||||
# Assets folder for chicken parmesan
|
||||
# Add images here:
|
||||
# - hero.jpg
|
||||
# - close-up.jpg
|
||||
# - plated.jpg
|
||||
@ -23,6 +23,8 @@ export interface RecipeMetadata {
|
||||
author: string;
|
||||
description: string;
|
||||
featured: boolean;
|
||||
display: boolean;
|
||||
displayPhoto: string;
|
||||
}
|
||||
|
||||
export interface Recipe extends RecipeMetadata {
|
||||
@ -55,20 +57,22 @@ function getOrPopulateRecipes(): Recipe[] {
|
||||
|
||||
const mdxFiles = findMDXFiles(recipesDirectory);
|
||||
|
||||
const recipes = mdxFiles.map((filePath) => {
|
||||
const fileContents = fs.readFileSync(filePath, 'utf8');
|
||||
const { data, content } = matter(fileContents);
|
||||
const recipes = mdxFiles
|
||||
.map((filePath) => {
|
||||
const fileContents = fs.readFileSync(filePath, 'utf8');
|
||||
const { data, content } = matter(fileContents);
|
||||
|
||||
const folderPath = path.dirname(filePath);
|
||||
const relativePath = path.relative(recipesDirectory, folderPath);
|
||||
const folderPath = path.dirname(filePath);
|
||||
const relativePath = path.relative(recipesDirectory, folderPath);
|
||||
|
||||
return {
|
||||
...(data as RecipeMetadata),
|
||||
filePath,
|
||||
folderPath: relativePath,
|
||||
content,
|
||||
};
|
||||
});
|
||||
return {
|
||||
...(data as RecipeMetadata),
|
||||
filePath,
|
||||
folderPath: relativePath,
|
||||
content,
|
||||
};
|
||||
})
|
||||
.filter((recipe) => recipe.display !== false);
|
||||
|
||||
const sortedRecipes = recipes.sort((a, b) => new Date(b.date).getTime() - new Date(a.date).getTime());
|
||||
|
||||
@ -113,33 +117,8 @@ export function getRecipeBySlug(slug: string): Recipe | undefined {
|
||||
}
|
||||
|
||||
export function getRecipeByCategoryAndSlug(category: string, slug: string): Recipe | undefined {
|
||||
const categoryPath = path.join(recipesDirectory, category);
|
||||
|
||||
if (!fs.existsSync(categoryPath)) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const mdxFiles = findMDXFiles(categoryPath);
|
||||
|
||||
for (const filePath of mdxFiles) {
|
||||
const fileContents = fs.readFileSync(filePath, 'utf8');
|
||||
const { data, content } = matter(fileContents);
|
||||
const metadata = data as RecipeMetadata;
|
||||
|
||||
if (metadata.slug === slug && metadata.category === category) {
|
||||
const folderPath = path.dirname(filePath);
|
||||
const relativePath = path.relative(recipesDirectory, folderPath);
|
||||
|
||||
return {
|
||||
...metadata,
|
||||
filePath,
|
||||
folderPath: relativePath,
|
||||
content,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
return undefined;
|
||||
const allRecipes = getOrPopulateRecipes();
|
||||
return allRecipes.find((recipe) => recipe.category === category && recipe.slug === slug);
|
||||
}
|
||||
|
||||
export function searchRecipes(query: string): Recipe[] {
|
||||
|
||||
@ -4,6 +4,20 @@ import createMDX from '@next/mdx';
|
||||
const nextConfig: NextConfig = {
|
||||
reactStrictMode: true,
|
||||
pageExtensions: ['js', 'jsx', 'md', 'mdx', 'ts', 'tsx'],
|
||||
images: {
|
||||
remotePatterns: [
|
||||
{
|
||||
protocol: 'http',
|
||||
hostname: 'localhost',
|
||||
pathname: '/api/recipe-image**',
|
||||
},
|
||||
],
|
||||
localPatterns: [
|
||||
{
|
||||
pathname: '/api/recipe-image**',
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
const withMDX = createMDX({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user