A coders approach to storing recipes
Sometimes I like to cook things
This is a very short blog about something I recently discovered: Cooklang.
‘Cook’ isn’t some coding jargon, nor a confession that I have gone full Walter White.
I mean literally cooking. Food.
Finding the best option to catalogue recipes took a bit of research, but I finally landed on a solution I’m happy with.
Hosting your own recipes
When evaluating this, I cared about:
- Plain text formats
- Git-friendly
- Self-hostable
- No mandatory mobile app
- Longevity / open standard
There are a few options available:
Mealie
- Seemed like best full integrated app out there to store recipes.
- It’s full database, Python API, Vue frontend solution - longevity concerns for something so simple.
- Seems a bit heavyweight, but probably be best option if you need multi-tenancy / logins.
- It also keeps the approach super simple and non-technical for other users.
- Tandoor is a good alternative.
- Both can be viewed as PWA, or also have third-party mobile app skins.
Nextcloud Cookbook
- I already run Nextcloud, so this seemed like an obvious solution.
- While I love the simplicity of using something I already have, it does rely on continued maintenance of this installable plugin app.
- There is a third-party mobile app to view the stored recipes too, but it’s a bit of a pain to need an app for this…
- Perhaps I will return to this if my requirements change, as it does have a pretty neat ‘input URL and store the receipe’ approach - seems simple enough.
Cooklang
- I loved the idea behind cooklang, a markdown extension spec and collection of Rust libraries.
- The recipes are still human readable markdown, even without a specialised parser. No app lock in. Future-proof.
- No app needs to be installed to view them, or catalogue them. Instead, simply host on an existing website (i.e. this blog).
- To save time, I have been using an LLM to convert PDF recipes I already have into cooklang format for posterity.
Example for Crème Brûlée:
> > source: https://cooking.nytimes.com/recipes/9039-vanilla-creme-brulee
> > servings: 4
> > time: 1 hour
Preheat #oven{} to 165°C.
In a #saucepan{}, combine @heavy cream{470%ml}, @vanilla bean{1}, split lengthwise (or @vanilla extract{1%tsp}), and @salt{0.8%g}. Cook over low heat just until hot. Let sit for a few minutes, then discard the vanilla bean. If using vanilla extract, add it now.
In a #bowl{}, beat @egg yolks{5} and @sugar{100%g} together until light.
Stir about a quarter of the cream into the egg mixture, then pour the egg mixture back into the cream and stir to combine.
Pour into four #6-ounce ramekins{4} and place ramekins in a #baking dish{}. Fill the dish with boiling water halfway up the sides of the ramekins.
Bake for ~{30%minutes} to ~{40%minutes}, or until centres are barely set. Cool completely. Refrigerate for several hours and up to a couple of days.
When ready to serve, top each custard with about @sugar for topping{1%tsp} per ramekin in a thin layer. Place ramekins under a broiler 2 to 3 inches from the heat source. Broil until sugar melts and browns, about ~{5%minutes}. Serve within two hours.
View the recipes
I added an ‘easter egg’ to this website.
If you click the “bonus-content” button in the footer 5 times, you will be able to view my hosted recipes.
Enjoy!