Recipe website powered by git
6 months ago

#1 Support for images

~anjan filed ticket on fathub.org todo

7 months ago


This is the code and recipes for fathub.org. It's a recipe website.

#Recipe file format

Recipes are stored in yaml files in recipes/$name/$slug.yml

Recipe template:

name: Very tasty recipe
author: The chef <chef@example.com>
created: 1970-01-01
description: This is the recipe description, shown on top of the recipe page
cuisine: delicious # free text field
course: main
preptime: 15 # Time in minutes
cooktime: 30 # Time in minutes
serves: 4 # Must be an integer, used by calculations on the html frontend

# The ingredient list describes all ingredients in the recipe with proper units and
# amounts if possible. Then the id field is used to refer to an ingredient in the
# cooking steps and tips.
# Ingredients can be grouped by adding slashes into the id, then you can refer to
# a group of ingredients by group/*

  - id: sauce/roux/butter
    label: Butter
    amount: 50
    unit: gr
  - id: sauce/roux/flour
    label: Flour
    amount: 50
    unit: gr
  - id: sauce/milk
    label: Milk
    amount: 500
    unit: ml
  - id: sauce/pepper
    label: Pepper
    amount: to taste
  - id: sauce/salt
    label: Salt
    amount: A dash

# The stage list describes... the cooking stages
# For simple recipes this can be a single item. For complex dishes this might split
# the recipe into parts that can be done in parallel.
# The stages have an id field to refer to them in the cooking steps. and a title field
# for the display title. the depends field is an array of ids this stage depends on
# making the stages an acyclic directed graph so sequental and parallel parts can be
# described.

  - id: sauce
    text: The sauce
  - id: dish
    text: Preparing the dish
  - id: plating
    text: Plating
      - sauce
      - dish

# The cooking instructions describe the whole recipe in small steps. The preferred
# rendering method for frontends is to have a checkbox for every item so the progress
# can be kept while cooking.

# Inside the text field you can refer to one or multiple ingredients using the bracket
# syntax shown below. The renderer supports only basic globbing based on the "path".

  - stage: sauce
    text: Mix the [sauce/roux/*] together in a pan and whisk for a few minutes. 
  - stage: sauce
    text: Add the [sauce/milk] slowly while stirring, making it homogenous.
  - stage: sauce
    text: Add the [sauce/pepper] and [sauce/salt]

# It's possible to add tips/suggestions to the bottom of the recipe with the tips: field
# The formatting syntax is the same as in the instruction text.

  - This is a traditional french sauce, so it's required to wear a big white hat
  - The [sauce/milk] needs to be not expired