There are two ways to populate data into a Cicero Template. Either via a sample.md file or a data.json file. The cicero trigger only supports sample.md.
ERROR: A text/sample.md file is required. Try the --sample flag or create a text/sample.md in your template.
Possible Solution
Add CLI option --data which accepts a data.json file as data input to the template.
In many ways, this is cleaner than having to parse a sample.md file first that then produces the data payload.
Detailed Description
The problem is exacerbated when there is heavy use of {{% %}} and --unquotevariables. In this case, Cicero does not always produce sample.md files that can be validly parsed by Cicero. This means it's not possible to use the cicero trigger command in these scenarios. :-(
Bug Report 🐛
There are two ways to populate data into a Cicero Template. Either via a
sample.md
file or adata.json
file. Thecicero trigger
only supportssample.md
.Expected Behavior
Would expect the following to be a valid command.
Current Behavior
If no
sample.md
provided then get error:Possible Solution
Add CLI option
--data
which accepts adata.json
file as data input to the template. In many ways, this is cleaner than having to parse asample.md
file first that then produces the data payload.Detailed Description
The problem is exacerbated when there is heavy use of
{{% %}}
and--unquotevariables
. In this case, Cicero does not always producesample.md
files that can be validly parsed by Cicero. This means it's not possible to use thecicero trigger
command in these scenarios. :-(