Dynamic generation or inclusion of Livebook content?

Looking over the Livebook intro materials, I haven’t found anything that allows dynamic generation or inclusion of Livebook content. Basically, I’d like something akin to PHP, but with the output being Markdown or Elixir code blocks rather than HTML.

I’d like to use this feature to assist in creating dynamic, modular Livebooks. As an example, I might use this to generate a table of contents or index, include previously and/or dynamically generated content, etc. Am I missing something?


There are, of course, some questions that would need to be resolved in setting up this sort of thing. For example, how would it be invoked and what syntax should it use?

Unless we want to extend the syntax for all Livebook entries, we need to have a way to flag particular entries as being dynamic. FWIW, it occurs to me that “Smart” button entries could be added for (say) “Dynamic Block” and “Dynamic Code”.

My take on syntax is that it would be nice to use something Elixirish for the dynamic commands, but the details are rather fuzzy. Suggestions welcome, as always…


Have you looked into Kino and Smart Cells? I’m feeling pretty confident that what you want to do is well supported already by Livebook.

Kino docs: Kino — Kino v0.6.2

Thanks! That looks quite promising.