Variable-based output filenamesΒΆ
When rendering a directory, it is sometimes useful to use variables in the filenames to output.
Note
This is useless for single files, since most clients allow you to choose the name of the output file.
Setup templates with +variable+ in the filename:
echo "Focus on filename" | curl -X PUT -F "file=@-" http://localhost:8106/foo/+bar+.txt
The variables within + will be resolved and replaced by their value:
$ curl -X POST -d bar=baz http://localhost:8106/foo | tar -zt
foo/baz.txt
Note
This behaviour is disabled when using the template tree template.
This feature is meant for simple cases. If you need advanced things for filenames, use the template tree template.