How is it done
Technology
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:
- Picking a Chef and a Theme: We randomly choose one of four vegan chef personas — Emily (Northern California), Hiroshi (Kyoto shojin ryori), Isabella (Tuscany), or Nia (Swahili coast) — and pair them with a random style adjective and a random kind of dish drawn from curated lists.
- Recipe Generation: We send a single prompt to
gemini-3-flash-previewthat combines the chef persona, the style and kind, and a strict JSON template. The model returns the title, intro, outro, ingredients, instructions, tags, SEO description, nutrition facts, allergies, preparation time, yield, an image prompt, and an image alt text — all in one structured response. - Validation and Sanitization: The JSON is parsed and checked for required keys. The slug is normalized to lowercase ASCII letters, digits, and hyphens before it touches the filesystem or git.
- Visual Realization with Nano Banana: The image prompt produced in step 2 is sent to
gemini-3.1-flash-image-preview(Nano Banana) at 3:2 aspect ratio and 2K size. The call is retried up to three times in case the response is missing image data. - Assembling the Post: The base64 image is decoded and saved into
src/media/. Front matter (title, description, tags, figure metadata including the alt text) and the body (intro, ingredients, instructions, outro, chef signature, and an additional-info table) are written to a markdown file insrc/content/posts/using{% figure %}and{% picture %}shortcodes for responsive images. - Commit and Push: The image and markdown file are staged, committed with a slug-based message, and pushed to https://github.com/polent/recipe.
- Automated Deployment: A GitHub Action builds the Eleventy site and deploys it to GitHub Pages.
- Start over: A cronjob triggers the script once per day, so the cycle repeats.

Through this innovative use of AI technology, our blog consistently delivers fresh, enticing, and original vegan recipes, complete with eye-catching images that make vegan cooking more accessible and enjoyable for everyone.