Skip to content

Commit fc9d0f6

Browse files
committed
yield added - and formatting fix
1 parent 5406aa5 commit fc9d0f6

1,299 files changed

Lines changed: 1324 additions & 1303 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/_11ty/filters.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,13 +251,32 @@ const extractNutrition = html => {
251251
return nutrition;
252252
};
253253

254+
// Extract yield information from nutrition table
255+
const extractYield = html => {
256+
if (!html) return null;
257+
258+
// Look for "Yield" row in table
259+
const yieldMatch = html.match(/<th[^>]*>\s*Yield\s*<\/th>\s*<td[^>]*>\s*([^<]+)\s*<\/td>/i);
260+
if (!yieldMatch || !yieldMatch[1]) return null;
261+
262+
const yieldText = stripHtml(yieldMatch[1]).trim();
263+
264+
// If yield info is empty or "none", return null
265+
if (!yieldText || yieldText.toLowerCase() === "none") {
266+
return null;
267+
}
268+
269+
return yieldText;
270+
};
271+
254272
function extractRecipeData(html, recipeUrl) {
255273
const result = {
256274
image: null,
257275
ingredients: [],
258276
instructions: [],
259277
prepTime: null,
260278
nutrition: null,
279+
yield: null,
261280
modifiedHtml: html,
262281
};
263282

@@ -273,6 +292,7 @@ function extractRecipeData(html, recipeUrl) {
273292
// Extract prep time and nutrition early
274293
result.prepTime = extractPrepTime(html);
275294
result.nutrition = extractNutrition(html);
295+
result.yield = extractYield(html);
276296

277297
const headings = [];
278298
const headingRegex = /<h2[^>]*>([\s\S]*?)<\/h2>/gi;

src/_includes/layouts/post.njk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
},
4545
"image": recipeImage,
4646
"keywords": recipeKeywords,
47+
"recipeYield": recipeData.yield,
4748
"recipeCuisine": recipeCuisine,
4849
"recipeIngredient": recipeData.ingredients,
4950
"recipeInstructions": recipeData.instructions,

src/content/about.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,28 @@ eleventyNavigation:
55
title: How is it done
66
order: 3
77
title: "How is it done"
8-
description: "Discover our AI-driven process for creating unique vegan recipes. We use gpt- 4o for content framework and dall-e-3 for stunning images, seamlessly updating our blog with fresh, enticing vegan dishes."
8+
description: "Discover our AI-driven process for creating unique vegan recipes. We use gpt- 4o for content framework and gemini-2.5-flash-image for stunning images, seamlessly updating our blog with fresh, enticing vegan dishes."
99
permalink: "/how-is-it-done/index.html"
1010
figureAbout:
1111
caption: "Vegan Food Blog Technology Workflow"
1212
className: "about-figure"
1313
imageSrc: "./src/media/about/vegan_blog_workflow.png"
1414
imageTitle: "Vegan Food Blog Technology Workflow"
15-
imageAlt: "flow chart illustrating the multi-step process used by your vegan food blog, detailing each stage from initiating the process with gpt- 4o to the automated deployment of content. This visual representation helps in understanding the sequence and interactions of the various steps involved in your sophisticated AI-driven recipe generation and posting."
15+
imageAlt: "flow chart illustrating the multi-step process used by your vegan food blog, detailing each stage from initiating the process with gemini-3-flash-preview to the automated deployment of content. This visual representation helps in understanding the sequence and interactions of the various steps involved in your sophisticated AI-driven recipe generation and posting."
1616
loading: "lazy"
1717
---
1818

1919
## Technology
2020

21-
Our blog employs a sophisticated multi-step process to generate unique and visually appealing vegan recipes, utilizing cutting-edge AI technology. Here's how it works:
21+
This blog employs a sophisticated multi-step process to generate unique and visually appealing vegan recipes, utilizing cutting-edge AI technology. Here's how it works:
2222

23-
1. **Initiating the Process:** We start by using `gpt-4-turbo` to establish ourselves as a Vegan food blog. This AI model helps us define the framework and theme for our content, focusing on vegan cuisine.
24-
2. **Recipe Generation:** Next, we prompt `gpt-4-turbo` again, this time inputting a set of random keywords related to vegan cooking. The AI then generates a unique recipe, complete with a detailed description that aligns with these keywords.
23+
1. **Initiating the Process:** We start by using `gemini-3-flash-preview` to establish ourselves as a Vegan food blog. This AI model helps us define the framework and theme for our content, focusing on vegan cuisine.
24+
2. **Recipe Generation:** Next, we prompt `gemini-3-flash-preview` again, this time inputting a set of random keywords related to vegan cooking. The AI then generates a unique recipe, complete with a detailed description that aligns with these keywords.
2525
3. **Image Prompt Creation:** Using the information from the generated recipe, we craft a specific prompt to guide the creation of a corresponding image. This prompt is designed to capture the essence of the recipe in a visually compelling way.
26-
4. **Visual Realization with Dall-E:** With the prompt ready, we turn to `dall-e-3`, an advanced AI image generation model. Dall-E interprets our prompt and creates a stunning, high-quality image that represents the recipe.
26+
4. **Visual Realization with Nano Banana:** With the prompt ready, we turn to `gemini-2.5-flash-image`, an advanced AI image generation model. Dall-E interprets our prompt and creates a stunning, high-quality image that represents the recipe.
2727
5. **Creating the Recipe Post:** Once we have both the recipe and its image, we compose a complete recipe post. This post is then committed and pushed to our GitHub repository, which can be found at [https://github.com/polent/polent.github.io](https://github.com/polent/polent.github.io).
2828
6. **Automated Deployment:** Finally, a GitHub Action takes over. This automated process builds the code from the repository and deploys it onto our web space. This ensures that our blog is consistently updated with fresh content, seamlessly and efficiently.
29-
7. **Start over:** The steps start again, 1-2 times a day initiated by a conjob.
29+
7. **Start over:** The steps start again, 1 times a day initiated by a conjob.
3030

3131
{% figure figureAbout.caption, figureAbout.className %}
3232
{% picture figureAbout.imageSrc, figureAbout.imageTitle, figureAbout.imageAlt, figureAbout.loading %}

src/content/posts/2024-01-30-smoky-drink-recipe-6595.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,5 @@ Enjoy this smoky drink as a refreshing and intriguing alternative to your usual
4747

4848
*Isabella*
4949

50-
<table><caption class="sr-only">Additional Information</caption><tr><th scope="row">Nutritionfacts</th><td>&nbsp;</td></tr><tr><th scope="row">Preparation Time</th><td>5 minutes</td></tr><tr><th scope="row">Allergy Information</th><td>&nbsp;</td></tr></table>
50+
<table><caption class="sr-only">Additional Information</caption><tr><th scope="row">Nutritionfacts</th><td></td></tr><tr><th scope="row">Preparation Time</th><td>5 minutes</td></tr><tr><th scope="row">Allergy Information</th><td></td></tr></table>
5151

src/content/posts/2024-01-31-african-crispy-appetizer-2181.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,5 @@ Total Fat: 3g
5757
Saturated Fat: 0.3g
5858
Carbohydrates: 10g
5959
Fiber: 2g
60-
Protein: 4g&nbsp;</td></tr><tr><th scope="row">Preparation Time</th><td>20 minutes&nbsp;</td></tr><tr><th scope="row">Allergy Information</th><td>Gluten-free&nbsp;</td></tr></table>
60+
Protein: 4g</td></tr><tr><th scope="row">Preparation Time</th><td>20 minutes</td></tr><tr><th scope="row">Allergy Information</th><td>Gluten-free</td></tr></table>
6161

src/content/posts/2024-01-31-al-dente-finger-foods-7268.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,5 @@ Sodium: 250mg
6363
Total carbohydrates: 15g
6464
Dietary fiber: 3g
6565
Sugar: 2g
66-
Protein: 6g&nbsp;</td></tr><tr><th scope="row">Preparation Time</th><td>30 minutes&nbsp;</td></tr><tr><th scope="row">Allergy Information</th><td>Gluten (breadcrumbs)&nbsp;</td></tr></table>
66+
Protein: 6g</td></tr><tr><th scope="row">Preparation Time</th><td>30 minutes</td></tr><tr><th scope="row">Allergy Information</th><td>Gluten (breadcrumbs)</td></tr></table>
6767

src/content/posts/2024-01-31-bitter-marinade-recipe-5352.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,5 @@ Sodium: 196mg
6262
Total Carbohydrate: 2g
6363
Fiber: 0.4g
6464
Sugar: 0.6g
65-
Protein: 0.4g&nbsp;</td></tr><tr><th scope="row">Preparation Time</th><td>10 minutes&nbsp;</td></tr><tr><th scope="row">Allergy Information</th><td>This bitter marinade recipe is free from common allergens.&nbsp;</td></tr></table>
65+
Protein: 0.4g</td></tr><tr><th scope="row">Preparation Time</th><td>10 minutes</td></tr><tr><th scope="row">Allergy Information</th><td>This bitter marinade recipe is free from common allergens.</td></tr></table>
6666

src/content/posts/2024-01-31-buttery-side-dish-recipe-3567.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,5 @@ Total Fat: 7g
5151
Sodium: 200mg
5252
Carbohydrates: 12g
5353
Fiber: 6g
54-
Protein: 4g&nbsp;</td></tr><tr><th scope="row">Preparation Time</th><td>20 minutes&nbsp;</td></tr><tr><th scope="row">Allergy Information</th><td>This recipe is vegan and gluten-free.&nbsp;</td></tr></table>
54+
Protein: 4g</td></tr><tr><th scope="row">Preparation Time</th><td>20 minutes</td></tr><tr><th scope="row">Allergy Information</th><td>This recipe is vegan and gluten-free.</td></tr></table>
5555

src/content/posts/2024-01-31-citrusy-breakfast-recipe-5135.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,5 +58,5 @@ Sodium: 5mg
5858
Total Carbohydrate: 35g
5959
Dietary Fiber: 7g
6060
Sugar: 25g
61-
Protein: 3g&nbsp;</td></tr><tr><th scope="row">Preparation Time</th><td>10 minutes&nbsp;</td></tr><tr><th scope="row">Allergy Information</th><td>None&nbsp;</td></tr></table>
61+
Protein: 3g</td></tr><tr><th scope="row">Preparation Time</th><td>10 minutes</td></tr><tr><th scope="row">Allergy Information</th><td>None</td></tr></table>
6262

src/content/posts/2024-01-31-citrusy-marinade-7787.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,5 @@ Sodium: 200mg<br />
6262
Total Carbohydrate: 3g<br />
6363
Dietary Fiber: 0g<br />
6464
Sugar: 1g<br />
65-
Protein: 1g&nbsp;</td></tr><tr><th scope="row">Preparation Time</th><td>10 minutes&nbsp;</td></tr><tr><th scope="row">Allergy Information</th><td>This citrusy marinade is vegan and does not contain any common allergens.&nbsp;</td></tr></table>
65+
Protein: 1g</td></tr><tr><th scope="row">Preparation Time</th><td>10 minutes</td></tr><tr><th scope="row">Allergy Information</th><td>This citrusy marinade is vegan and does not contain any common allergens.</td></tr></table>
6666

0 commit comments

Comments
 (0)