A place to cache linked articles (think custom and personal wayback machine)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.md 7.7KB

title: Cooklang - Managing Recipes in Git url: https://briansunter.com/blog/cooklang/ hash_url: 48c2a5401b

Cooklang is like markdown for recipes. It lets you write recipes in a human-readable format that a computer can parse to get the ingredient list, steps, etc.

Recipe sites have gotten so bloated that you need to read someone's entire life story to get the ingredients and steps. I'm a big fan of storing information in plain text in git, as well as [[cooking]], so I was happy to discover CookLang.

I don't want to write my recipes in completely unstructured text, because then I can't do interesting things like generate shopping lists, convert units, get required cookware, etc. I also don't want to write them in a highly structured format like JSON because it would be too difficult to read and maintain.

I like cooklang because you can read it like a recipe if you want. I also like that you can list the ingredients throughout the steps and it automatically builds an ingredients list. This way you don't have to maintain a dedicated ingredients list and it's easier to update.

This is what a cooklang recipe looks like.

>>title: Sous Vide Steak
>>description: A simple consistent way to cook great steak
>>source: https://www.seriouseats.com/food-lab-complete-guide-to-sous-vide-steak
Preheat a sous vide cooker to desired final temperature.

Season @steaks{450%g} generously with @salt and @pepper

Place in @sous vide bags{} along with @thyme{4%sprigs}, @rosemary{4%sprigs}, @garlic{4%cloves}, and @shallots{2%thinly sliced} and distribute evenly.

Seal bags and place in water bath for desired time according to charts.

Turn on your vents and open your windows. Add one tablespoon of ghee, vegetable,
canola, or rice bran oil to a heavy
and preheat the skillet until it reaches 450 degrees.

Gently lay steak in skillet, using your fingers or a set of tongs.

Add @butter{30%g} (2 tablespoons).

After 15 to ~{30%seconds}, flip steak so that the second side comes into contact with the pan.
Repeat, flipping steak every ~{30%seconds}, until it has developed a nice brown sear, about ~{1.5%minutes} total.

Serve steak immediately

Although the text is human readable, this is what the special syntax means.

@ingredient{quantity%unit} for example @butter{30%g}

Simple ingredients can be specified like @salt.

Ingredients with spaces can use curly braces @ground pepper{}

Time can be specified with ~{quantity%units} like ~{30%seconds}

Metadata can be added in the form of >>key: value

>>source: https://www.seriouseats.com/food-lab-complete-guide-to-sous-vide-steak

You can specify cookware needed with #cookware{} like #potato masher{}.

Overall I'm really happy with cooklang. It was pretty easy to integrate with my static site and the Obsidian cooklang plugin works well. I hope to collect my favorite recipes and continue to tune them over time.

See here for my complete list of recipes categories by tag.