We just started experimenting with Typst to understand if it can replace our asciidoc-based solution for some technical documentation.
It looks very promising with fast updates and pipeline-able document generation. The addition of a WYSIWYG editor is compelling and not something our current setup can offer, so I wanted to understand whether our current documentation and use cases can be covered adequately with Typst.
One of our biggest use cases is dynamically embedding various diagram types (mermaid, wavedrom, graphviz, others) by the use of an internally-hosted kroki server. Asciidoctor can handle this well; the diagram code itself lives in the .adoc file and with proper editor settings, can show real-time previews of the entire document as arbitrary diagrams or other document contents are updated.
I spent some time trying to understand how such an integration might function for Typst documentation and the solution is not as clear as I expected it to be. I did not find any mention of “kroki” on the forums or in documentation. While we could generate an image output from Kroki and have it imported, the code itself would not live in the Typst document (that I can tell), and is very static. I think it would require a mutli-step build process of running a script to re-generate all Kroki diagrams, then previewing with Typst to pull in all new images.
Because I am not familiar with the Typst ecosystem, I expect there is a better way to do what we need. What is the “right” way to solve this?