# Cooklang and SilverBullet

**URL:** https://community.silverbullet.md/t/cooklang-and-silverbullet/4066
**Category:** Plug Development
**Created:** [April 19, 2026, 11:20pm UTC](https://community.silverbullet.md/t/cooklang-and-silverbullet/4066 "2026-04-19T23:20:59Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![stainless](https://community.silverbullet.md/user_avatar/community.silverbullet.md/stainless/32/3391_2.png) [@stainless](https://community.silverbullet.md/u/stainless)
#### Post date: [April 19, 2026, 11:20pm UTC](https://community.silverbullet.md/t/cooklang-and-silverbullet/4066/1 "2026-04-19T23:20:59Z")

</div>

I'm considering taking a stab at integrating [https://cooklang.org/](https://cooklang.org/) into SilverBullet. Though there's a Lua implementation it hasn't been updated in a couple of years, and there are two more recent implementations in Typescript.

I'm guessing based on what little I know that this would be a good candidate for a plug? Any suggestions on even where I'd begin? Is there a starter plug somewhere I can look at? I'm not even sure which topic is best to post this into, so took a stab at Plug Development.

---

<div class="post-metadata">

### Author: ![MrMugame](https://community.silverbullet.md/user_avatar/community.silverbullet.md/mrmugame/32/358_2.png) [@MrMugame](https://community.silverbullet.md/u/MrMugame)
#### Post date: [April 20, 2026, 8:11am UTC](https://community.silverbullet.md/t/cooklang-and-silverbullet/4066/2 "2026-04-20T08:11:35Z")

</div>

I'd start by taking a look at some plugs, that's really the best documentation there is. There are the [builtin plugs](https://github.com/silverbulletmd/silverbullet/tree/main/plugs) and [community plugs](https://silverbullet.md/Plugs). The basic setup shouldn't be too hard I think. It then really depends on what you want to do.  
What I could imagine, is that you implement an indexer, which grabs all codeblocks which are recipes, or pages with frontmatter indicating they are recipes, parse them and put them in the index. [This](https://github.com/silverbulletmd/silverbullet/blob/main/plugs/index/space_lua.ts) for example is the code which indexes space lua blocks.  
You could then also implement widgets for rendering. This would be done by exporting a syscall. There are examples of that on here or inside of existing plugs.

---

<div class="post-metadata">

### Author: ![stainless](https://community.silverbullet.md/user_avatar/community.silverbullet.md/stainless/32/3391_2.png) [@stainless](https://community.silverbullet.md/u/stainless)
#### Post date: [April 20, 2026, 10:52pm UTC](https://community.silverbullet.md/t/cooklang-and-silverbullet/4066/3 "2026-04-20T22:52:39Z")

</div>

Can you elaborate on what you mean by exporting a syscall to render a widget?

---

<div class="post-metadata">

### Author: ![MrMugame](https://community.silverbullet.md/user_avatar/community.silverbullet.md/mrmugame/32/358_2.png) [@MrMugame](https://community.silverbullet.md/u/MrMugame)
#### Post date: [April 21, 2026, 8:49pm UTC](https://community.silverbullet.md/t/cooklang-and-silverbullet/4066/4 "2026-04-21T20:49:19Z")

</div>

I just made a [guide](https://community.silverbullet.md/t/an-opinionated-guide-to-plug-development/4072) about plug development, which may help.

---

<div class="post-metadata">

### Author: ![stainless](https://community.silverbullet.md/user_avatar/community.silverbullet.md/stainless/32/3391_2.png) [@stainless](https://community.silverbullet.md/u/stainless)
#### Post date: [April 21, 2026, 9:24pm UTC](https://community.silverbullet.md/t/cooklang-and-silverbullet/4066/5 "2026-04-21T21:24:31Z")

</div>

This is exactly what I was looking for, thank you!

---

<div class="post-metadata">

### Author: ![bnorick](https://community.silverbullet.md/letter_avatar_proxy/v4/letter/b/50afbb/32.png) [@bnorick](https://community.silverbullet.md/u/bnorick)
#### Post date: [April 22, 2026, 3:58pm UTC](https://community.silverbullet.md/t/cooklang-and-silverbullet/4066/6 "2026-04-22T15:58:18Z")

</div>

I hope you make this happen, I'd be super excited about this integration!

---

<div class="post-metadata">

### Author: ![stainless](https://community.silverbullet.md/user_avatar/community.silverbullet.md/stainless/32/3391_2.png) [@stainless](https://community.silverbullet.md/u/stainless)
#### Post date: [April 22, 2026, 10:47pm UTC](https://community.silverbullet.md/t/cooklang-and-silverbullet/4066/7 "2026-04-22T22:47:50Z")

</div>

Me too, now I just have to remember how to write code--it's been a while 😀

---

<div class="post-metadata">

### Author: ![stainless](https://community.silverbullet.md/user_avatar/community.silverbullet.md/stainless/32/3391_2.png) [@stainless](https://community.silverbullet.md/u/stainless)
#### Post date: [May 19, 2026, 12:57pm UTC](https://community.silverbullet.md/t/cooklang-and-silverbullet/4066/8 "2026-05-19T12:57:05Z")

</div>

I'm realizing that I'm a bit over my head, mainly lack of free time to dedicate to this but also my withering coding skills. I wouldn't be at all offended if someone else takes a crack at this.

---

<div class="post-metadata">

### Author: ![schmavery](https://community.silverbullet.md/user_avatar/community.silverbullet.md/schmavery/32/3523_2.png) [@schmavery](https://community.silverbullet.md/u/schmavery)
#### Post date: [May 19, 2026, 3:12pm UTC](https://community.silverbullet.md/t/cooklang-and-silverbullet/4066/9 "2026-05-19T15:12:04Z")

</div>

@stainless I'm curious what it would have done if you'd been able to build it  
It looks like cooklang is sort of an extension of markdown with stuff like `@flour{2%cups}`?

Were you imagining rendering those `@flour{2%cups}` bits nicely + a header with ingredients + cook time? Just curious!

I wonder if one could get somewhere just using [Syntax](https://v2.silverbullet.md/Library/Std/APIs/Syntax) `syntax.define` to render widgets inline for the special bits along with [tag](https://v2.silverbullet.md/API/tag) `tag.transform` to index them in order to make an ingredients header... 🤔

---

<div class="post-metadata">

### Author: ![stainless](https://community.silverbullet.md/user_avatar/community.silverbullet.md/stainless/32/3391_2.png) [@stainless](https://community.silverbullet.md/u/stainless)
#### Post date: [May 19, 2026, 5:23pm UTC](https://community.silverbullet.md/t/cooklang-and-silverbullet/4066/10 "2026-05-19T17:23:11Z")

</div>

Yes, cooklang is an extension of markdown with recipe specific syntax. I was thinking I'd integrate a cooklang parser (there are several to choose from, including one in lua--though I believe the typescript versions are more robust) to generate the markup. Then you'd "just" need to apply some css to make it pretty.
