process command be introduced in templates such that text can be piped into and from it like
f() | process(...).out | process(..., format="<output format parser like say JSON>").out | g()`
process will create a process to which one can pipe data into
stdin. Also maybe this can be enabled and disabled in the config.
This will be like
load_data but data is returned from a process. Alternatively, it can be
We have thought about something similar-ish but it’s not planned for now.
@sirinath I had the same idea and built a universal Rust CLI for this use case: mo8it/http-cmd: Run a command over HTTP - Codeberg.org
It can be used to run a command and embed its output in the built HTML. It can pass
stdin or additional command arguments. The repository contains Zola examples.
@keats Your comment about thinking about something similar is from a while ago. I saw on Github that you don’t plan this anymore and I agree this feature shouldn’t be built-in for security reasons. Running arbitrary commands hidden in some template when I try building a static website is not something I would expect or want. But maybe you could add my
http-cmd somewhere to the docs. I don’t want it to be communicated as something official. Just in some FAQ as “this is a third-party tool that could be used”.